remove files (POSIX)
rm [-Rfir] [-d] [-l n] [-v] file...
Remove the a.out and core files.
rm a.out core
Remove the directory junk and all its contents, without prompting.
rm -Rf junk
The rm utility removes each specified file from a directory.
By default, rm refuses to remove any file that names a directory. This may be overridden with the -R or -r options. In any case, rm always refuses to remove the current working directory.
If a file operand has been specified but doesn't exist and the -f option hasn't been given, a message is written to the standard error output. If -f has been given, the error message isn't written. In either case, rm goes on to any remaining files.
The rm utility doesn't necessarily remove the file itself. A file may have more than one link; that is, it may be known by more than one name in the filesystem (see the ln utility for information on creating links). The rm utility breaks one such link; it dissociates the file from one name. If this is the only link, the file data becomes inaccessible and the file space is returned to the system for reuse. Otherwise, the data remains accessible via other names.