cp

The cp command


The cp command lets you copy a file from one location to another on a UNIX machine.

The cp command produces no output unless you have made a mistake.

The cp command will overwrite an existing file without warning you.

Most UNIX commands have a variety of additional command modifiers that can be used to change the output. For example, if you typed

cp -r * /tmp

you would copy everything in the directory and RECURSIVELY (-r) everything in the subdirectories underneath that directory to the /tmp directory.

Other popular cp commands include

For more help with the cp command or to see the online UNIX manual for the cp command, click here.

The mv command

The mv command is similar to the cp command, except it copies the file and deletes the original.

The mv command is what you would use to rename a file

Other popular mv commands include

For more help with the mv command or to see the online UNIX manual for the mv command, click here.


UNIX

Commands

Directory

File

Other

Help

Search