Name
cp
Synopsis
cp
[old
] [new
]
This makes a copy of a file where
old
is a pathname to the original file and
new
is the name you want to give the copy
of the file. (This is similar to the “save as” function
in an application.) The following sample code makes a copy of the
file art.html
and names the copy
art2.html
.
% cp art.html art2.htmlcp
[file
] [directory
]
This puts a copy of the original file into an existing directory. The
following sample code makes a copy of art.html
and puts it in Richard’s work directory:
% cp art.html /user/richard/work
Get Web Design in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.