Moving and Copying Files and Directories
The command for moving and opying directories and files are mv for moving and cp for copy. If you want to rename a file, you can use the move command . No you are not really moving the file, but in both Linux and Unix , the developers realized that renaming something was a lot like moving it .
Hence the format of the move command is my < source> <destination>
With the example files, you could move the file named stupidkirk to a file named evenmorestupid by executing the following command
mv stupidkirk evenmorestupid
This leaves the file in the same directory, but changes its name to evenmorestupid .
Hence the file is not moved – it is just simply renamed .
Next you can try moving the evenmorestupid file to the top of the stupidpeople directory. To do this you first have to move the file up and then move it to the stupidpeople directory.
This can be done with one simple command :
mv evenmorestupid ../ stupidpeople
Lastly note that the destination file uses the ..( or parent) directory designation. This tells Linux to go up one directory level and look for a directory called stupidpeople . and then put the file into that directory with the name stupidpeople, as you did not specify any other name.
