Skip to main content

3.7) Moving Files Around Directories


If you want to now move a file into the ‘research’ directory then you can do this by using the mv command. Type:

mv data1 research

This will move ‘data1’ from the current home directory and put it into the directory called research. No copy of ‘data1’ remains in the current directory for the mv command.

When using the cp or mv commands, if the last word names a directory then the command will place the file in that directory. cp leaves a copy in the original directory whereas mv does not.

This introduces basic cp and mv commands.