rmdir(1) - SerenityOS man pages

#Name

rmdir - remove empty directories

#Synopsis

$ rmdir `[directory...]`

#Description

Remove given directory(ies), if they are empty

#Options

#Arguments

#Examples

# Try to remove non-empty directory
$ mkdir serenity ; echo cool > serenity/cool.txt
$ rmdir serenity
rmdir: Directory not empty

# Remove empty directory
$ mkdir example
$ ls -a example
.   ..
$ rmdir example
$ ls -a example
example: No such file or directory

# Removes foo/bar/baz/, foo/bar/ and foo/
$ rmdir -p foo/bar/baz/

#See also