www.delorie.com/gnu/docs/textutils/coreutils_76.html   search  
Buy GNU books!

GNU Core-utils

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.6 rmdir: Remove empty directories

rmdir removes empty directories. Synopsis:

rmdir [option]... directory...

If any directory argument does not refer to an existing empty directory, it is an error.

The program accepts the following option. Also see 2. Common options.

Ignore each failure to remove a directory that is solely because the directory is non-empty.

Remove directory, then try to remove each component of directory. So, for example, `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b a'. As such, it fails if any of those directories turns out not to be empty. Use the `--ignore-fail-on-non-empty' option to make it so such a failure does not evoke a diagnostic and does not cause rmdir to exit unsuccessfully.

Give a diagnostic for each successful removal. directory is removed.

See section 11.5 rm: Remove files or directories, for how to remove non-empty directories (recursively).

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003