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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access