Tuesday, June 16, 2015

Basic Unix commands Video: What's the difference between copy and move?

I used to struggle with this simple command on Unix, and know that others do as well.  Sometimes the simplest things can seem confusing or complicated until you finally "get it", then it all makes sense.


In a nutshell: Copy 'cp'  and Move 'mv' do virtually the same thing Copy just keeps the file in 2 places.


I know that sounds simple, but it's good to be clear with the basics, whenever you use copy you will have 2 copies of the file.  When you use move, you will only have 1 version of the folder or file and simply move it to some other location.

This becomes confusing when you see the most common use for the move command which is actually used to rename files.  Maybe they should have a command called 'rename' instead of move.

I'll show you some examples in the video below, hopefully you will walk away from this video with better clarity of Move and Copy.  Don't get discouraged when you are new to Mac and Unix, there are so many terminal commands.  The truth is that you really only use about 12 - 15 on a daily basis, you don't have to learn ALL of Unix on day 1 :-)






Hope this helps, if you want me to make a certain video, suggest it in the comments below :-)
Keep coding peeps, you can do this!