$
Linux Practice
Practice
Tutorials
English
한국어
日本語
中文
terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user
@linux:
~
$
Removing Files and Directories
Reset Lesson
Learn to safely remove files and directories with rm.
Step 1
Create a test file to practice removal.
Type: touch testfile.txt
touch testfile.txt
Step 2
Remove the test file using rm.
Step 3
Verify the file was removed by listing files.
Step 4
Create a directory with a file, then remove it recursively. Try: mkdir testdir && touch testdir/file.txt && rm -r testdir.