Removing Files and Directories
If you have les that are no longer needed, you should remove (delete) them.
Deleting unnecessary les leaves more room on your system. For example,
suppose you've nished using
, type:
myfile2
$ rm myfile2
To remove an
dirname
rmdir
4
If there are any visible or invisible (\dot") les still in the directory, this
command will not be executed, and you will get a message that the directory is
not empty. Also, if there are any subdirectories in the directory, you will get a
message. In either case you can do the following:
dirname
cd
rm *
ll -a
.lenames You may have to repeat this command for all dot les.
rm
rmdir *
cd ..
dirname
rm
4-10 Using the Command Line
myfile2
empty directory, type the following:
Any invisible \dot" lenames remaining will be displayed.
This removes any empty subdirectories.
To get to the parent directory again.
, and it is no longer needed. To remove
DRAFT
2/5/97 11:31