cp Flashcards
1
Q
cp
![](https://s3.amazonaws.com/brainscape-prod/system/cm/313/329/054/q_image_thumb.png?1591377699)
A
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
![](https://s3.amazonaws.com/brainscape-prod/system/cm/313/329/054/a_image_thumb.png?1591377690)
2
Q
cp
- a
- attributes-only
–backup[=CONTROL]
- b
- d
- f
A
- a, –archive, Same as -dR –preserve=ALL
- attributes-only, Don’t copy file data, just the attributes.
–backup[=CONTROL], Make a backup of each existing destination file.
- b, Like –backup but does not accept an argument.
- d, Same as –no-deference –preserve=links
- f, –force, If an existing destination file cannot be opened, remove it and try again.
3
Q
cp
- i
- n
- v
- r, -R
- u
A
- i, –interactive, Prompt before overwrite.
- n, –no-clobber, Do not overwrite an existing file.
- v, –verbose, Explain what is being done.
- r, -R, –recursive, Copy directories recursively.
- u, –update, Copy only when the SOURCE file is newer than the destination file.
4
Q
cp
- s
- l
- p
- P
–sparse
A
- s, –symbolic-link, Make symbolic links instead of copying.
- l, –link, Hard link files instead of copying.
- p, Same as –preserve=mode, ownership, timestamps.
- P, –no-deference, Never follow symbolic links.
–sparse=WHEN, Control creation of sparse files.