Operating Modes
Cp has three principal modes of operation. These modes are inferred from the type and count of arguments presented to the program upon invocation.
- When the program has two arguments of path names to files, the program copies the contents of the first file to the second file, creating the second file if necessary.
- When the program has one or more arguments of path names of files and following those an argument of a path to a directory, then the program copies each source file to the destination directory, creating any files not already existing.
- When the program's arguments are the path names to two directories, cp copies all files in the source directory to the destination directory, creating any files or directories needed. This mode of operation requires an additional option flag, typically r, to indicate the recursive copying of directories. If the destination directory already exists, the source is copied into the destination, while a new directory is created if the destination does not exist.
Read more about this topic: Cp (Unix)
Famous quotes containing the words operating and/or modes:
“I think there are innumerable gods. What we on earth call God is a little tribal God who has made an awful mess. Certainly forces operating through human consciousness control events.”
—William Burroughs (b. 1914)
“Men and women are brothers and sisters; they are not of different species; and what need be obtained to know both, but to allow for different modes of education, for situation and constitution, or perhaps I should rather say, for habits, whether good or bad.”
—Samuel Richardson (16891761)