Linux rm command for removing files in directories

Published: November 22, 2014 | Last Modified: November 22, 2014

Delete files from a directory:

rm [options..] [file|directory]

-f Remove all files in a directory without prompting the user.
-i Interactive. With this option, rm prompts for confirmation before removing any files.
-r (or) -R Recursively remove directories and subdirectories in the argument list. The directory will be emptied of files and removed. The user is normally prompted for removal of any write-protected files which the directory contains.


sudo rm -rf /media/Data/.Trash-1000/files
sudo rm -rf /home/.Trash-0/info