[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cleanup a directory



Jerome BENOIT wrote:

> Hello List,
> 
> to clean some directories of mine, I use
> 
> rm -rf *
> 
> but files named as `.log' are not removed.
> 
> Is there a better way to do so ?

Go to the previous directory and then remove the directory using rm -rf.
This will remove other hidden files along with the .log files.


I tend to resist the use of * when using rm -rf. I usually work with a lot
of terminals open (inside konsole). So the probability of being in the
wrong directory and removing its contents is large if I use '*' with
rm -rf. But when the directory name is explicitly specified, the
probability of removing the wrong directory is small. YMMV.

hth
raju
-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


Reply to: