|
|
The rm command in the Unix operating system is used to remove files from the file system. It is similar to the del command in MS-DOS.
Its usage is considered potentially more dangerous than equivalents in other operating systems because of the way Unix and Unix-like systems parse wildcards and names of special directories and in its non-verbose actions. A classic example:
$ rm * .o rm: cannot remove `.o': No such file or directory
To remove a file whose name starts with a `-', for example `-foo', use one of these commands:
rm -- -fooNote that if you use rm to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using shred.rm ./-foo