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

Working with Directories

This section covers deleting directories, copying and moving files between directories, and moving directories. It also describes how to use pathnames to make your work with GNU/Linux easier.

rmdir: Deletes a Directory

The rmdir (remove directory) utility deletes a directory. You cannot delete the working directory or a directory that contains other than . and .. entries. If you need to delete a directory with files in it, first use rm to delete the files and then delete the directory. You do not have to delete the . and .. entries; rmdir removes them automatically. The following command deletes the directory that was created in Figure 4-5:

$ rmdir /home/alex/literature
						

The rm utility has a –r option (rm –r filename ...

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