NAME rm, rmdir - remove directory entries SYNOPSIS rm [-f] [-i] file... rm -rR [-f] [-i] dirname...[file...] rmdir [-ps] dirname... DESCRIPTION rm The rm command removes the directory entry specified by each file argument. If a file has no write permission and the standard input is a terminal, the full set of permissions (in octal) for the file are printed followed by a question mark. This is a prompt for confirmation. If the answer begins with y (for yes), the file is deleted, otherwise the file remains. If file is a symbolic link, the link will be removed, but the file or directory to which it refers will not be deleted. Users do not need write permission to remove a symbolic link, provided they have write permissions in the directory. If multiple files are specified and removal of a file fails for any reason, rm will write a diagnostic message to stan- dard error, do nothing more to the current file, and go on to any remaining files. If the standard input is not a terminal, the command will operate as if the -f option is in effect. rmdir The rmdir command will remove the directory entry specified by each dirname operand, which must refer to an empty direc- tory. Directories will be processed in the order specified. If a directory and a subdirectory of that directory are specified in a single invocation of rmdir, the subdirectory must be specified before the parent directory so that the parent directory will be empty when rmdir tries to remove it. EXAMPLES rm The following command: example% rm a.out core removes the directory entries: a.out and core. The following command: example% rm -rf junk removes the directory junk and all its contents, without prompting. rmdir If a directory a in the current directory is empty except it contains a directory b and a/b is empty except it contains a directory c, example% rmdir -p a/b/c will remove all three directories. SEE ALSO rmdir(2), unlink(2), environ(5) For more information, use the 'man rm' command.