Skip to main content

4.15) Moving Around From Another Directory Not In The Path


This time we will go from the home directory into research and then into datafiles directory and we will move the file ‘data1’ from the home directory into the documents directory. This is the most general case as we are not in either of the directories that we are transferring the file from or to. To go into ‘datafiles’ directory, type:

cd research/datafiles

Now to make a copy of the file ‘data1’ and put it in the documents directory, type:

cp ~/data1 ~/research/documents

or using full paths (Note: if you use the full paths then you need to use the full paths that are on your system, so don’t just type the command on the next page).