TestOut Linux Pro Practice Test 2025 – Complete Exam Prep Guide

Image Description

Question: 1 / 400

How do you specify interactive mode for the rm command?

rm -f [filename]

rm -v [filename]

rm -i [filename]

The rm command in Linux is used to remove files and directories, and it can operate with various options that modify its behavior. When specifying interactive mode, the command prompts the user for confirmation before proceeding with the deletion of each specified file. This is particularly useful to prevent accidental data loss.

Using the flag ‘-i’ achieves this interactive mode. When you run the command with the ‘-i’ option followed by a filename, it will prompt you to confirm whether you want to delete that specific file. For example, if you enter `rm -i myfile.txt`, the system will ask "remove myfile.txt?".

While other options provided may be valid flags for the rm command, they do not enable interactive mode. The ‘-f’ option forces the removal without prompting for confirmation, the ‘-v’ option provides verbose output by showing the files being removed, and using ‘--interactive’ is merely a longer form that accomplishes the same interactive prompting, but since it's not the most common shorthand, 'rm -i' is more widely recognized for this function. Thus, option C is the direct and standard way to invoke interactive mode in the rm command.

Get further explanation with Examzify DeepDiveBeta

rm --interactive [filename]

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy