tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY RE: SUMMARY: rm limitations?
@ 2002-04-26 16:27 McGuinness Todd
  0 siblings, 0 replies; only message in thread
From: McGuinness Todd @ 2002-04-26 16:27 UTC (permalink / raw)
  To: tru64-unix-managers

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@nagra.com 



-----Original Message-----
From: McGuinness Todd [mailto:todd.mcguinness@nagra.com]
Sent: vendredi, 26. avril 2002 18:16
To: Tru64-Unix-Managers@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@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-26 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-26 16:27 SUMMARY RE: SUMMARY: rm limitations? McGuinness Todd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox