Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 667 Bytes

File metadata and controls

18 lines (13 loc) · 667 Bytes

This command is used to delete files

Syntax

rm [options] file-list

Option Function
–interactive -i Provides an interactive prompt before removing file.
–recursive -r Deletes the contents of the specified directory, including all its subdirectories, and the directory itself
–verbose -v Displays the name of each file as it is removed.
–force -f Without asking for your consent, removes files for which you do not have write access permission. This option also suppresses informative messages if a file does not exist.

Examples:-

  • rm filename
  • rm -rf filename
  • rm * ( deletes all files in a given directory )