cp

The cp command is used to copy a file from one location to another location. You do not alter the original file when you perform a copy. Provided that you have access to the destination directory to which you wish to copy a file, you can place as many copies of a file in that destination as you wish.

The following bullet list describes some of the types of copies you can perform with cp. Because there are many file types in UNIX (as covered in Chapter 20) and you have many ways to specify path names for the source and destination files being copied, this list might help you understand the many ways that cp can be used:

  • Copy a source file to a new file name.

  • Copy several source files to a different directory.

  • Copy several source files to the ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition 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.