nerdexam
CompTIA

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…

System Management

Question

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 exists?

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)
  • A
    92% (22)
  • B
    4% (1)
  • C
    4% (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

#Linux Commands#File Management#mv command#Command Options

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice