Quote:
Originally Posted by Leo Gutierrez
Code:
rm `find -name "*.txt" `
|
If it's too many arguments with globbing, how do you expect backticks to help cram them into one argument list? That's not going to work!
---------- Post updated at 01:47 PM ---------- Previous update was at 01:45 PM ----------
Quote:
Originally Posted by edfair
The list generated is limited in size. Try breaking your request down to the size it can handle like:
rm a*.txt
rm b*.txt
and so forth. If one of the sub groups is too large you will need to break it down further.
I think the limit is 256 but it has been a while since I tried to difine it.
|
This is not an effective or general-purpose solution, especially since the size of a commandline may be limited by the size of the names and not just their number. The proper way to deal with it is to use pipes or tools, not to keep randomly trying different globs until you find one small enough.