Posts Linux Command Line Debian Terminal

Linux rm command for removing files in directories

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.

Examples:

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