Javatpoint Logo
Javatpoint Logo

Linux rm | Linux Delete File

The 'rm' means remove. This command is used to remove a file. The command line doesn't have a recycle bin or trash unlike other GUI's to recover the files. Hence, be very much careful while using this command. Once you have deleted a file, it is removed permanently.

Syntax:

Example:

rm file

In above snapshot, we have removed file myfile1 permanently with the help of 'rm' command.


rm Options

OptionDescription
rm *extensionUsed to delete files having same extension.
rm -r or RTo delete a directory recursively.
rm -iRemove a file interactively.
rm -rfRemove a directory forcefully.
Next TopicLinux cp command




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA