In linux, to move/copy a file/dir, what two flags should you always include to keep the file permissions/symlinks, etc intact (use the flags on cp for the answer)?
Answer
cp -pd
^^ p is to preserve mode, ownership, timestamps, and d is to preserve links (no de-reference)
Question
In linux, to move/copy a file/dir, what two flags should you always include to keep the file permissions/symlinks, etc intact (use the flags on cp for the answer)?
Answer
?
Question
In linux, to move/copy a file/dir, what two flags should you always include to keep the file permissions/symlinks, etc intact (use the flags on cp for the answer)?
Answer
cp -pd
^^ p is to preserve mode, ownership, timestamps, and d is to preserve links (no de-reference)
If you want to change selection, open document below and click on "Move attachment"
4. Basic Commands er. The cp command also takes the -R option, allowing it to copy whole directories. The mv command is used to move files and directories. It really just renames a file to a different directory. <span>Note that with cp you should use the option -p and -d with -R to preserve all attributes of a file and properly reproduce symlinks (discussed later). Hence, always use cp -dpR <dir> <newdir> instead of cp -R <dir> <newdir> . 4.6 Relative vs. Absolute Pathnames Commands can be given file name
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.