XK0-005 · Question #1671
A Linux administrator is tasked with moving files in a database server. The administrator must not overwrite any existing files. Which of the following commands would indicate that the file already…
The correct answer is A. mv -i filename /tmp/backup. mv -i (interactive mode) prompts the user with a confirmation message before overwriting an existing file, effectively indicating that the file already exists. This is the option that provides explicit notification. mv -b silently creates a backup of the destination file before…
Question
Options
- Amv -i filename /tmp/backup
- Bmv -b filename /tmp/backup
- Cmv -n filename /tmp/backup
- Dmv -f filename /tmp/backup
How the community answered
(24 responses)- A92% (22)
- B4% (1)
- C4% (1)
Explanation
mv -i (interactive mode) prompts the user with a confirmation message before overwriting an existing file, effectively indicating that the file already exists. This is the option that provides explicit notification. mv -b silently creates a backup of the destination file before overwriting without warning the user. mv -n (no-clobber) silently skips the move if the destination exists - it protects the file but gives no indication. mv -f (force) overwrites without any prompt, which is the opposite of what is needed.
Topics
Community Discussion
No community discussion yet for this question.