A system administrator needs to copy the directory "/var/log" and all its subdirectories from the local server to a remote host, ensuring file permissions, ownership, and timestamps remain intact. Which option combination should be applied to accomplish this?
The "-pr" flags tell scp (Secure Copy Protocol) to perform recursive copies of directories while preserving timestamps, permissions, and ownership. The "-p" option by itself maintains metadata but does not recurse into subdirectories, and "-r" by itself copies directories without preserving metadata. The "-P" option designates an alternate port and does not affect recursion or metadata preservation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does 'scp' stand for and how does it work?
Open an interactive chat with Bash
What are file permissions in Linux and why are they important?
Open an interactive chat with Bash
What are the main differences between the '-p', '-r', and '-P' options in scp?