home | articles | links | fun | about
Up to: Quick math and science observations

deleting UNIX files

it's hard to remove a directory and all its contents in unix. try this:

(be careful that you are in the proper directory!!!)

rm *

rm */*

rm */*/*

rm */*/*/* ...

keep going until no files found. this removes all the files, but not directories.

then,

rmdir */*/*/*/*

rmdir */*/*/*

...

rmdir *

use the up arrow to get to previous input, makes it much easier.

this removes all the directories/subdirectories.