Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(1) — HP-UX 8.07

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rm(1)

rmdir(2)

stat(2)

rmdir(1)

NAME

rmdir − remove directories

SYNOPSIS

rmdir [−f|−i] [−p] dir ...

DESCRIPTION

rmdir removes the directory entry for each dir operand, which shall refer to an empty directory. 

Directories are removed in the order specified.  Consequently, if a directory and a subdirectory of that directory are both specified as arguments, the subdirectory must be specified before the parent directory so that the parent directory will be empty when rmdir tries to remove it.  Removal of a directory requires write and search (execute) permission in its parent directory, but no permissions on the directory itself. 

Options

The following options are available:

−f Force each directory to be removed without prompting for confirmation, regardless of the presence of the −i option.  This option also suppresses diagnostic messages regarding non-existent operands. 

This option does not suppress any diagnostic messages other than those regarding non-existent operands.  To suppress all error message and interactive prompts, the −f option should be used while redirecting the standard error output to /dev/null.

−i Write a prompt to the standard error output requesting confirmation before removing each directory.  This option is ignored when used in conjunction with the −f option. 

−p Path removal.  If, after removing a directory with more than one pathname component, the parent directory of that directory is now empty, rmdir will remove the empty parent directory.  This continues until rmdir encounters a non-empty parent directory, or until all components of the original pathname have been removed. 

When used in conjunction with the −i option, rmdir asks whether to remove each directory component of a path. 

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the interpretation of filenames as single and/or multi-byte characters for the rmdir command. 

LANG determines the language in which messages are displayed and determines the local language equivalent of y (for yes/no) queries. 

If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable.  If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.  If any internationalization variable contains an invalid setting, rmdir behave as if all internationalization variables are set to "C".  See environ(5).

International Code Set Support

Single- and multi-byte character code sets are supported. 

DIAGNOSTICS

Generally self-explanatory.  Note that the −f option does not suppress all diagnostic messages. 

EXAMPLES

To remove directories with a prompt for verification:

rmdir −i directories

To remove as much as possible of a path, type:

rmdir −p component1/component2/dir

SEE ALSO

rm(1), rmdir(2), stat(2). 

STANDARDS CONFORMANCE

rmdir: SVID2, XPG2, XPG3

Hewlett-Packard Company  —  HP-UX Release 8.05: June 1991

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