Bird
0
0

Which of these is the correct syntax to remove a file named data.log?

easy📝 Syntax Q3 of 15
Linux CLI - File and Directory Operations
Which of these is the correct syntax to remove a file named data.log?
Arm -r data.log
Brm data.log
Crm -d data.log
Drm --delete data.log
Step-by-Step Solution
Solution:
  1. Step 1: Identify basic file removal syntax

    The basic command to remove a file is rm filename. Check other options: -r is for directories, -d removes empty directories, and --delete is not a valid option.
  2. Final Answer:

    rm data.log -> Option B
  3. Quick Check:

    Basic rm filename removes a file [OK]
Quick Trick: Just use rm filename to delete a file [OK]
Common Mistakes:
MISTAKES
  • Using -r for files
  • Using invalid options like --delete
  • Trying to remove non-empty directories with -d

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes