Try "find / -name * -exec rm -f {} \;"On Tue, Nov 11, 2003 at 12:43:28PM +1100, Darryl Harvey wrote:I've tried "rm -f" a few times on Large directories (Old log entries) and it has barfed on me saying there are too many files (Maybe not in those exact words) So I'd argue that "cd /;rm -rf" would barf and NOT be successful... Anyone got a spare system to try it on :-)No spare system, but some light on the subject. the complaint you saw comes not from rm itself, but from the shell when trying to expand the file name list. Remember that in *NIX it's the shell that performs glob expansion, not the programs as in good'ol DOS. Thus: rm -f * gets expanded into rm -f file1 file2 file3 ... But since the shell has a limit on the length of the command line and/or the number of arguments, it barfed at you. OTOH, "cd /;rm -rf" would also barf, since there are no filename arguments. Now, "cd /;rm -rf *" would start eating files to it's heart desire. Cheers,
If you just want to delete the content of a subdirectory replace / with "subdirectory" ;-)
This should solve the "too many files" problem.
Regards
Markus
-- Markus Miller, Ingeniero de Software Gerencia de Software, SONDA S. A. Teatinos 500, Santigago, Chile Fono: (562) 560 5523, Fax: (562) 247 1031 markus.miller@xxxxxxxxx