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.



rm file

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

rm Options

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

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA