Terminal Icon

Copying a file

To copy a file, use the cp command.

For example, to create a copy of the file oneFile called secondFile, type:

cp oneFile secondFile

A file named secondFile is created with the same contents as the original file.

The cp command will overwrite a file if the new filename you specify already exists.

For more information on copying files, refer to the cp man page by entering: man cp

See also

UNIX

Open this for me

man page for cp