Bird
0
0

What will happen if you run the command rm -i file1.txt file2.txt?

medium📝 Command Output Q13 of 15
Linux CLI - File and Directory Operations
What will happen if you run the command rm -i file1.txt file2.txt?
ADeletes both files without asking
BAsks for confirmation before deleting each file
CDeletes only file1.txt and ignores file2.txt
DShows an error because -i cannot be used with multiple files
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -i option

    The -i option makes rm ask for confirmation before deleting each file.
  2. Step 2: Apply to multiple files

    When multiple files are listed, rm -i will ask for confirmation separately for each file before deleting.
  3. Final Answer:

    Asks for confirmation before deleting each file -> Option B
  4. Quick Check:

    -i means interactive confirmation [OK]
Quick Trick: Use -i to confirm each file deletion [OK]
Common Mistakes:
  • Thinking -i deletes without asking
  • Believing -i works only for one file
  • Assuming -i causes error with multiple files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes