Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rm, delete

unlink

rmdir



RMDIR(1,C)                  AIX Commands Reference                   RMDIR(1,C)



-------------------------------------------------------------------------------
rmdir



PURPOSE

Removes a directory.

SYNTAX


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 li -l command to see if the directory is empty.

EXAMPLE

To empty and remove a directory:

  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.

To remove a hidden directory, append "@" to the directory name:

  rmdir test@

Hidden directories are created with the -h flag of the mkdir command.

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 file names that begin with a dot because
the li or ls command does not normally list them.

RELATED INFORMATION

See the following command:  "rm, delete."

See the unlink and rmdir system calls in AIX Operating System Technical
Reference.




Processed November 8, 1990        RMDIR(1,C)                                  1



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