March 2002
Beginner
504 pages
10h 47m
English
In the preceding sections, you looked at listing files and viewing their content. In this section, you will look at copying, renaming, and removing files using the cp, mv, and rm commands.
The cp command (short for copy) is used to make a copy of a file. The basic syntax of the command is
cp src dest
Here src is the name of the file to be copied (the source) and dest is the name of the copy (the destination). For example, the following command creates a copy of the file fruits in a file named fruits.sav:
$ cp fruits fruits.sav
If dest is the name of a directory, a copy with the same name as src is created in dest. For example, the command
$ cp fruits Documents/
creates a copy of the file fruits in the ...
Read now
Unlock full access