From FreeBSDwiki
Revision as of 20:43, 12 September 2004 by Jimbo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

cp - used to copy files or directories from one location to another. Commonly-used flags include -r (recursive) and -p (preserve owner/group/timestamps as allowed). For example:

ph34r# cp -rp /home/jimbo /home/dave

Would copy the directory /home/jimbo and all of its contents to /home/dave, and preserve ownership, group ownership, and file modification timestamps on everything copied. NOTE: -p is generally useless unless you are running under root context; in most cases only root can arbitrarily set ownership and access times at will.

Compare mv.

Personal tools