Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rm(1) — SunOS 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rmdir(1)

ln(1)

RM(1)  —  USER COMMANDS

NAME

rm − remove (unlink) files or directories

SYNOPSIS

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

DESCRIPTION

rm removes (directory entries for) one or more files.  If an entry was the last link to the file, the contents of that file are lost. See ln(1) for more information about links.

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 the 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. 

rm −r and rmdir remove entries for directories.  rmdir removes the named directory only if it is empty.  To remove a directory containing files, use rm with the −r option.  See rmdir(1) for more information about removing directories.

OPTIONS

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

−rRecursively delete the contents of the specified directory (and its subdirectories), and the directory itself. 

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

−Treat the following arguments as filenames — so that you can specify filenames 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), ln(1)

Sun Release 3.0β  —  Last change: 12 July 1985

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