CompTIA Linux+ (XK0-005) — Question 255

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?

Answer options

Correct answer: A

Explanation

The correct command is 'mv –i', which prompts the user if the destination file exists, thus preventing overwriting. The 'mv –b' option creates a backup of the existing file but does not prompt; 'mv –n' will not overwrite files but doesn't indicate their existence. 'mv –f' forcibly moves the file and will overwrite without any warning.