O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

rmdir

Removes a directory

rmdir directory-list

The rmdir utility deletes empty directories from the filesystem by removing links to those directories.

Arguments

The directory-list contains pathnames of empty directories that rmdir removes.

Notes

Refer to the rm utility with the -r option if you need to remove directories that are not empty, together with their contents.

Examples

The following command line deletes the empty literature directory from the working directory:

$ rmdir literature
						

The next command line removes the letters directory, using an absolute pathname:

$ rmdir /home/jenny/letters
						

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required