Files
oldlinux-files/Minix/2.0.0/wwwman/man1/cpdir.1.html
2024-02-19 00:21:39 -05:00

124 lines
2.6 KiB
HTML

<HTML>
<HEAD>
<TITLE>cp(1)</TITLE>
</HEAD>
<BODY>
<H1>cp(1)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
cp, cpdir - file copy
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>cp</STRONG> <STRONG>[-pifsmrRvx</STRONG>] <EM>file1</EM> <EM>file2</EM>
<STRONG>cp</STRONG> <STRONG>[-pifsrRvx</STRONG>] <EM>file</EM> ... <EM>directory</EM>
<STRONG>cpdir</STRONG> <STRONG>[-ifvx</STRONG>] <EM>file1</EM> <EM>file2</EM>
</PRE>
<H2>OPTIONS</H2><PRE>
<STRONG>-p</STRONG> Preserve full mode, uid, gid and times
<STRONG>-i</STRONG> Ask before removing existing file
<STRONG>-f</STRONG> Forced remove existing file
<STRONG>-s</STRONG> Make similar, copy some attributes
<STRONG>-m</STRONG> Merge trees, disable the into-a-directory trick
<STRONG>-r</STRONG> Copy directory trees with link structure, etc. intact
<STRONG>-R</STRONG> Copy directory trees and treat special files as ordinary
<STRONG>-v</STRONG> Display what cp is doing
<STRONG>-x</STRONG> Do not cross device boundaries
</PRE>
<H2>EXAMPLES</H2><PRE>
<STRONG>cp</STRONG> <STRONG>oldfile</STRONG> <STRONG>newfile</STRONG> # Copy <EM>oldfile</EM> to <EM>newfile</EM>
<STRONG>cp</STRONG> <STRONG>-R</STRONG> <STRONG>dir1</STRONG> <STRONG>dir2</STRONG> # Copy a directory tree
</PRE>
<H2>DESCRIPTION</H2><PRE>
<EM>Cp</EM> copies one file to another, or copies one or more files to a
directory. Special files are normally opened and read, unless <STRONG>-r</STRONG> is
used. <STRONG>-r</STRONG> also copies the link structure, something <STRONG>-R</STRONG> doesn't care
about. The <STRONG>-s</STRONG> option differs from <STRONG>-p</STRONG> that it only copies the times if
the target file already exists. A normal copy only copies the mode of
the file, with the file creation mask applied. Set-uid bits are cleared
if the owner cannot be set. (The <STRONG>-s</STRONG> flag does not patronize you by
clearing bits. Alas <STRONG>-s</STRONG> and <STRONG>-r</STRONG> are nonstandard.)
<EM>Cpdir</EM> is a convenient synonym for <STRONG>cp</STRONG> <STRONG>-psmr</STRONG> to make a precise copy of a
directory tree.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man1/cat.1.html">cat(1)</A></STRONG>, <STRONG><A HREF="../man1/mkdir.1.html">mkdir(1)</A></STRONG>, <STRONG><A HREF="../man1/rmdir.1.html">rmdir(1)</A></STRONG>, <STRONG><A HREF="../man1/ln.1.html">ln(1)</A></STRONG>, <STRONG><A HREF="../man1/rm.1.html">rm(1)</A></STRONG>.
</PRE>
</BODY>
</HTML>