Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rm(1) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rmdir(1)

rmdir(2)

unlink(2)

RM(1)  —  User’s Manual — Commands

NAME

rm, rmdir  − remove (unlink) files or directories

SYNOPSIS

rm [ −f ] [ −r ] [ −i ] [ − ] file ...

rmdir dir ...

DESCRIPTION

Rm removes the entries for one or more files from a directory.  If an entry was the last link to the file, the file is destroyed.  Rm −r and rmdir remove entries for directories. 

To remove a file, you must have write permission in its directory; but you don’t need read or write permission on the file itself.  If you don’t have write permission on the file and standard input is a terminal, rm displays the file’s permissions and waits for you to type in a response.  If your response begins with ‘y’ the file is deleted; otherwise the file is left alone. 

To remove a full directory, use rm with the −r option (see below).  Rmdir removes the named directory only if it is empty. 

OPTIONS

The following are options for rm:

−fForce files to be removed, without displaying permissions, asking questions, or reporting errors. 

−rRecursively delete the entire contents of the specified directory and the directory itself. 

−iAsk whether to delete each file, or, under −r, whether to examine each directory.  Sometimes called the interactive option. 

−Treat all the following arguments as filenames — so that you can specify filesnames starting with a minus. 

WARNING

It is forbidden to remove the file ‘..’ merely to avoid the antisocial consequences of inadvertently doing something like ‘rm −r .∗’. 

SEE ALSO

rmdir(1), rmdir(2), unlink(2)

Sun System Release 0.3  —  26 April 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026