Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(1) — 4.2BSD 3.04v10.B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rm(1)

unlink(2)

rmdir(2)

RMDIR(1)  —  Unix Programmer’s Manual

NAME

rmdir, rm − remove (unlink) directories or files

SYNOPSIS

rmdir dirs

rm [ options ] files

DESCRIPTION

Rmdir removes entries for the named directories, which must be empty. 

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.  Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself. 

If a file has no write permission and the standard input is a terminal, its permissions are printed and a line is read from the standard input.  If that line begins with “y” the file is deleted, otherwise the file remains. 

OPTIONS

− Indicates that all the arguments following it are to be treated as filenames.  This allows the specification of filenames starting with a minus sign. 

−f Forces removal of files without write permission.  No questions are asked and no errors are reported when this option is given. 

−i Interactive option.  Causes rm to ask for confirmation before deleting each file. When this option is used with −r, rm asks whether to examine each directory. 

−r If a designated file is a directory, an error comment is printed unless the optional argument −r has been used.  In that case, rm recursively deletes the entire contents of the specified directory, and the directory itself. 

SEE ALSO

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

4th Berkeley Distribution  —  1 August 1985

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