Removing directories
You can remove directories using the rmdir
command. To remove a directory, type rmdir and
the name of the directory you want to remove.
rmdir only removes directories that are empty.
You can remove directories, subdirectories, and files all
at once using options to the rm command, which is
discussed later in this chapter. See
rm(C)
for more information.
Try creating a directory and then removing it:
-
Type cd and press <Enter> to go to your home directory.
-
Create a directory called Letters.
(Type mkdir Letters and press <Enter>.)
-
List the contents of the working directory (type lf
and press <Enter>), to confirm that the Letters
directory has been created.
-
Remove the Letters directory by typing rmdir
Letters, then pressing <Enter>.
-
List the directory (type lf and press <Enter>) to
confirm that Letters has disappeared.
Next topic:
Copying files
Previous topic:
Making directories
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003