0
0
Linux CLIscripting~10 mins

rm (remove files) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to remove a file named example.txt.

Linux CLI
rm [1]
Drag options to blanks, or click blank then click option'
A-r
B-f
C--help
Dexample.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Using options like -r or -f without a filename.
Typing the filename incorrectly.
2fill in blank
medium

Complete the code to force remove a file named data.log without any prompt.

Linux CLI
rm [1] data.log
Drag options to blanks, or click blank then click option'
A-f
B-r
C-i
D--help
Attempts:
3 left
💡 Hint
Common Mistakes
Using -i which asks for confirmation.
Using -r which is for directories.
3fill in blank
hard

Fix the error in the command to remove a directory named backup and all its contents.

Linux CLI
rm [1] backup
Drag options to blanks, or click blank then click option'
A-i
B-r
C-f
D--help
Attempts:
3 left
💡 Hint
Common Mistakes
Using -f alone does not remove directories.
Forgetting the recursive option causes an error.
4fill in blank
hard

Fill both blanks to remove all files with .tmp extension in the current directory without prompt.

Linux CLI
rm [1] [2]
Drag options to blanks, or click blank then click option'
A-f
B-r
C*.tmp
D-i
Attempts:
3 left
💡 Hint
Common Mistakes
Using -r which is for directories, not files.
Using -i which asks for confirmation.
5fill in blank
hard

Fill all three blanks to remove a directory named logs and all its contents forcefully and quietly.

Linux CLI
rm [1] [2] [3] logs
Drag options to blanks, or click blank then click option'
A-r
B-f
C-q
D-i
Attempts:
3 left
💡 Hint
Common Mistakes
Using -i which asks for confirmation.
Forgetting -r for directories.