The rmdir (remove directory) command removes the directory specified.
Example
[ Steve@localhost Steve ] $ rmdir prog-files
[ Steve@localhost Steve ] $ _
Here, the prog-files directory is deleted.
A directory can be deleted using the rmdir command only if it is:
1) Empty (does not contain files or sub-directories)
2) Not the current directory
Complete path names may also be specified with rmdir.
Example
[ Steve@localhost Steve] $ rmdir /home/Steve/tennis
[ Steve@localhost Steve ] $ _
The above command removes the tennis directory, which is located in Steve' s HOME directory.
Example
[ Steve@localhost Steve ] $ rmdir prog-files
[ Steve@localhost Steve ] $ _
Here, the prog-files directory is deleted.
A directory can be deleted using the rmdir command only if it is:
1) Empty (does not contain files or sub-directories)
2) Not the current directory
Complete path names may also be specified with rmdir.
Example
[ Steve@localhost Steve] $ rmdir /home/Steve/tennis
[ Steve@localhost Steve ] $ _
The above command removes the tennis directory, which is located in Steve' s HOME directory.