Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arguments too long

Status
Not open for further replies.

sraj142

Technical User
Oct 25, 2006
49
IN
Hi All,
I wanted to delete all the files in my /testdir. There are so many (10000000 nos) of files in the directory. I have tried the find & rm command, but "Arguments too long".
Earlier once I have seen a beutiful script here using for loop to delete all files in such case. Can anybody help me to find the script please ?

Regards - Subharaj
 
One word of caution. Be wary of using find . as above, and particularly with wildcards. Whilst it's perfectly valid, for safety, ensure that you're deleting from the correct directory by specifying the path to in in place of the period. People have been burned by that in the past (can you guess that I'm one of those people!).

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top