rm command in Linux with examples
rm stands for remove here. rm command is used to remove objects such as files, directories, symbolic links and so on from the file system like UNIX. To be more precise, rm removes references to objects from the filesystem, where those objects might have had multiple references (for example, a file with two different names). By default, it does not remove directories.
This command normally works silently and you should be very careful while running rm command because once you delete the files then you are not able to recover the contents of files and directories.
rm [OPTION]... FILE...
Let us consider 5 files having name a.txt, b.txt and so on till e.txt.
$ ls a.txt b.txt c.txt d.txt e.txt
Removing one file at a time $ rm a.txt $ ls b.txt c.txt d.txt e.txt Removing more than one file at a time $ rm b.txt c.txt $ ls d.txt e.txt
Note: No output is produced by rm, since it typically only generates messages in the case of an error.