Translations:Linux introduction/14/en

From Alliance Doc
Jump to navigation Jump to search

Copying and renaming files or directories

To copy a file use the cp command:

Question.png
[name@server ~]$ cp source_file destination_file

To recursively copy a directory:

Question.png
[name@server ~]$ cp -R source_directory destination_directory

To rename a file or a folder (directory), use the mv command (move):

Question.png
[name@server ~]$ mv source_file destination_file

This command also applies to directories. You should then replace source_file with source_directory and destination_file with destionation_directory.