02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NAME<br />

cp — copy files<br />

SYNOPSIS<br />

cp [-acfimPpSv] file1 file2<br />

cp [-acfimPpSv] file ... directory<br />

cp -R [-acfimPpSv] source... directory<br />

cp -r [-acfimPpSv] source... directory<br />

DESCRIPTION<br />

cp<br />

cp copies files to a target named by the last argument on its <strong>com</strong>mand line. If the target is an<br />

existing file, cp overwrites it; if it does not exist, cp creates it. If the target file already exists and<br />

does not have write permission, cp denies access and continues with the next copy.<br />

If you specify more than two path names, the last path name (that is, the target) must be a<br />

directory. If the target is a directory, cp copies the sources into that directory with names given by<br />

the final <strong>com</strong>ponent of the source path name.<br />

Normally, the destination file has its file mode (see chmod) set to 777 (that is, readable, writable,<br />

and executable by everyone) and sets the file modification time to the present. The -m and -p<br />

options can override this behavior.<br />

If a file being copied is a sparse file and the file system to which it is being copied does not support<br />

sparse files, cp warns that the resulting file will be larger. If the -i option was also specified, cp<br />

asks you if want to expand the file or skip it. The -S option overrides this behavior and expands all<br />

sparse files automatically when copying.<br />

Options<br />

-a<br />

-c<br />

copies the DACLs associated with the specified file along with the file itself.<br />

This option is only available on NTFS file systems.<br />

364 of 457

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!