Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

rmdir - Linux command line tool to delete directories

Date: 2007-05-24 00:00:00 -0400

rmdir is a command, to remove or erase directories. Remember that the directories should be empty to be deleted.

Usage

rmdir [options] directory_list

Options

--ignore-fail-on-non-empty
Suppresses the message rmdir normally displays when it fails to delete a directory because it is not empty
--parents -p
Removes the given directory and its children if they are empty
--verbose -v
Displays the names of directories as they are being removed
-r
Removes the directory if it is not empty, It removes the contents also

Example

rmdir --parents dirctory1/directory2/directory3

This will remove the directories, directory1, directory2, and directory3.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.