Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(1) — OSF/1 SILVER Baselevel 4 rev36

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ls(1)

rm(1)

rmdir(2)

unlink(2)

rmdir(1)  —  Commands

OSF

NAME

rmdir − Removes a directory

SYNOPSIS

rmdir directory ... 

DESCRIPTION

The rmdir command removes a directory from the system.  The directory must be empty before you can remove it, and you must have write permission in its parent directory.  Use the ls -al command to see if a directory is empty. 

EXAMPLES

To empty and remove a directory, enter:

rm mydir/∗ mydir/.∗
rmdir mydir

This removes the contents of mydir, then removes the empty directory. The rm command displays an error message about trying to remove the directories . (dot) and .. (dot dot), and then rmdir removes them. 

Note that rm mydir/∗ mydir/.∗ first removes files with names that do not begin with a . (dot), then those with names that do begin with a . (dot).  You may not realize that the directory contains filenames that begin with a . (dot) because the ls command does not normally list them unless you use the -a flag to see the files whose names begin with a . (dot). 

RELATED INFORMATION

Commands:  ls(1), rm(1). 

Functions: rmdir(2), unlink(2). 

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