help removing directory with tons of files

Status
Not open for further replies.

medicalhumor

Membership pending
Oct 17, 2007
2,408
105
0
I have a couple domains I put a search script on that cached all the damn search queries as .html files. I have a cache directory that has been filling up with thousands and thousands of files. Trying to access the directory just hangs everything.

Is there a way to 'quickly' delete the entire directory? I've done rm -rf /path/to/directory so far but it looks like it's going to be a long while. Is there a better way?
 


after I change directories to get into it, and -ls, it just hangs.

they're all .html files though. like "search_term.html"

f_03_9.html
it_03_9.html
does_16.html
about_s.html
9_2006.html
 
Try cd'ing into the directory and run from putty or such
find . -name '*.html' -print0 | xargs -0 rm -rf
Probably better ways to do it, but works for me on a cache dir with 100's of 1000's files.
 
Status
Not open for further replies.