Charles.Forsyth20060303-partialeea662d19 years agoHistory
134 lines · 1.9 KB · Text
RawDownload
.TH CP 1.SH NAMEcp, fcp \- copy files.SH SYNOPSIS.B cp[.B -gux].I fromfile tofile.br.B cp[.B -gux].I fromfile\&....I todir.br.B cp -r[.B -gux].I fromdir\&....I todir.PP.Bfcp[.BI -R " nr"] [.BI -W " nw"].I fromfile tofile.br.B fcp[.BI -R " nr"] [.BI -W " nw"].I fromfile\&....I todir.br.B fcp -r[.BI -R " nr"] [.BI -W " nw"].I fromdir\&....I todir.SH DESCRIPTIONIn the first form,.I fromfileis any name and.I tofileis any name except an existing directory.In the second form, the commands copy one or more.I fromfilesinto.I dirunder their original file names, as if by a sequence of commands in the first form. For example:.IP.B "cp f1 f2 dir".PPis equivalent to:.IP.B "cp f1 dir/f1;  cp f2 dir/f2".PP.I Cpcopies the contents of plain (non-directory) file.I fromfileto.IR tofile .The mode and owner of.I tofileare preserved if it already exists; the permissions of.I fromfileis used otherwise.The.B -xoption sets the full mode and modified time of.I file2from.IR file1 ;.B -gsets the group id; and.B -usets the group id and user id (which is usually only possible if the file server is in an administrative mode)..PPThe.B -roption directs.I cpto copy recursively the named directories.I "fromdir ..."to the target directory.IR todir ..PP.I Fcpbehaves like.IR cp ,but copies many blocks in parallel.It works only with files that respect read and write offsets (see.B preadand.B pwritein.IR sys-read (2)),which usually excludes files representing devices or services.When it applies, however, it is oftenmuch faster than.IR cp .The.B -Rand.B -Woptions set the number of readers and writers (default for each: 8)..SH SOURCE.B /appl/cmd/cp.b.br.B /appl/cmd/fcp.b.SH "SEE ALSO".IR cat (1),.IR mv (1),.IR sys-stat (2).SH DIAGNOSTICS.I Cpand.I fcprefuse to copy a file onto itself.