O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

cp

Copies one or more files

cp [options] source-file destination-file

cp [options] source-file-list destination-directory

The cp utility copies one or more files and has two modes of operation. The first copies one file to another; the second copies one or more files to a directory. The cp utility copies directories only with the -r or -R options.

Arguments

The source-file is the pathname of the file that cp is going to copy. The destination-file is the pathname that cp assigns to the resulting copy of the file.

The source-file-list is one or more pathnames of files that cp is going to copy. The destination-directory is the pathname of the directory in which cp places the copied files.

When you specify a destination-directory, cp gives each ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required