Name
rmdir — stdin stdout - file -- opt --help --version
Synopsis
rmdir [options
]directories
The rmdir
(remove
directory) command deletes one or more empty directories you
name:
$ rmdir /tmp/junk
Useful options
|
If you supply a
directory path (not just a simple directory name), delete
not only the given directory, but the specified parent
directories automatically, all of which must be empty. So
|
To delete a nonempty directory and its contents, use
(carefully) rm
-r
directory
. Use
rm -ri
to delete interactively,
or rm -rf
to annihilate without
any error messages or confirmation.
Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.