Using path commands
Keep in mind that Linux is case sensitive – ‘cd’ is not the same as ‘CD’ and ‘newstuff’ is not the same as ‘Newstuff’, you need to be careful with your use of upper and lower case.
Suppose that I am in the /home/jon/newstuff directory and there is a file there called ‘gettingolder.doc’ which I want to move to the /home/jon/oldstuff directory. The basic command for moving a file is ‘mv’, followed by the name of the file and followed by the destination directory. So the command I need here would be:
mv gettingolder.doc ../oldstuff
In other words pick up the file from this directory. Go up one level and down again into the oldstuff directory and drop it there.
An alternative would be
mv gettingolder.doc /home/jon/oldstuff
where the complete path name to reach the destination directory is supplied.
For a command that will work from anywhere on the file system I can supply a path name for both the source and the destination:
mv /home/jon/newstuff/gettingolder.doc /home/jon/oldstuff
For a command that will move several files I can use the asterisk character as a wild card to stand in for any set of characters: e.g.
mv /home/jon/newstuff/*.doc /home/jon/oldstuff
will move any files with a .doc extension in the newstuff directory to the oldstuff directory.
mv /home/jon/newstuff/*.* /home/jon/oldstuff
will move all the files in newstuff to oldstuff.
What about copying? Just replace the mv command with cp and the files will be copied rather than moved.