Wow - ok it appears that it is not a stupid question - too quick to react...
Here are some possible solutions
"It not a "rm" limitation, but a command line length limitation of your
shell
To bypass it, use the "xargs" command like that:
ls|xargs rm
find . -name 'some_pattern' -print|xargs rm
Look at the man pages of xargs." thanks Claude Charest
*************
this is a shell commandline maximum length. The shell tries to expand "*"
to all the filenames... and cannot fit into the max length (512 or 1024,
can't remember).
ls * would generrate the same problem for the same reason... it doesn't even
GET to ls!
usually, the same results can be achieved using find with -exec; for
example,
rm *
is the same as
find . -exec rm {} \;
(PROVIDED there are no sibdirectories!)
Use with GREAT caution. Thanks Gavin Kreuiter
******************************
And David DeWolfe sent a great link to archives, shoulda checked there
first I know..
http://www.ornl.gov/its/archives/mailing-lists/tru64-unix-managers/2001/02/m
sg00074.html
This list is a really great source of information thanks so much everybody.
Todd M. McGuinness
Systems Engineer
____________________________
NAGRAVISION SA
Kudelski Group
____________________________
Tel. : +41 21 732 03 11
Direct: +41 21 732 0623
Fax : +41 21 732 03 00
E-mail : mcguinness_at_nagra.com
-----Original Message-----
From: McGuinness Todd [mailto:todd.mcguinness_at_nagra.com]
Sent: vendredi, 26. avril 2002 18:16
To: Tru64-Unix-Managers_at_Ornl. Gov (E-mail)
Subject: SUMMARY: rm limitations?
Ok gang thanks, stupid question. The command was aliased to rm -e. without
it works.
Thanks for the response,
tm
-----Original Message-----
From: A. Mahendra Rajah [mailto:Mahendra.Rajah_at_URegina.CA]
Sent: vendredi, 26. avril 2002 18:10
To: McGuinness Todd
Subject: Re: rm limitations?
"what would be the other cause of an error: arg too long."
If you had wildcards in the filespec part, remember the shell
expands them into files before calling rm. The limitation
probably lies with the shell's command line buffer.
-- mahendra
Received on Fri Apr 26 2002 - 16:27:47 NZST