* command_XXX: Arg list too long
@ 1997-04-10 4:00 Slavisa Lukic
1997-04-10 4:00 ` D. Sean Davidson
1997-04-10 4:00 ` Bob Vickers
0 siblings, 2 replies; 3+ messages in thread
From: Slavisa Lukic @ 1997-04-10 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
I have a directory containing about 3000 files (RCS repository). When
try to start command using * (ls *, rlog *,...) I get the error message
for example :
"rlog: Arg list to long".
I have two questions:
1. Is there a possibility to increase the maximum argument list length.
2. If not possible, is there a better possibility to process each file
than to make a "for f in �ls RCS� ...." and do it for each file
separate. I mean say take a portion of 500 files a once.
Please make a Cc to my e-mail address
Slavisa Lukic
L&G, ZUG
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: command_XXX: Arg list too long
1997-04-10 4:00 command_XXX: Arg list too long Slavisa Lukic
@ 1997-04-10 4:00 ` D. Sean Davidson
1997-04-10 4:00 ` Bob Vickers
1 sibling, 0 replies; 3+ messages in thread
From: D. Sean Davidson @ 1997-04-10 4:00 UTC (permalink / raw)
There are two ways to process directories that have a count
of files that are over the command line length.
sh -c 'find . -type f -print | xargs ls'
sh -c 'find . -type f -print | (while read X; do ls $X; done)'
Sean
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: command_XXX: Arg list too long
1997-04-10 4:00 command_XXX: Arg list too long Slavisa Lukic
1997-04-10 4:00 ` D. Sean Davidson
@ 1997-04-10 4:00 ` Bob Vickers
1 sibling, 0 replies; 3+ messages in thread
From: Bob Vickers @ 1997-04-10 4:00 UTC (permalink / raw)
To: Slavisa Lukic
Slavisa Lukic wrote:
> =
> I have a directory containing about 3000 files (RCS repository). When
> try to start command using * (ls *, rlog *,...) I get the error message=
> for example :
> "rlog: Arg list to long".
> =
> I have two questions:
> =
> 1. Is there a possibility to increase the maximum argument list length.=
> 2. If not possible, is there a better possibility to process each file
> than to make a "for f in =B4ls RCS=B4 ...." and do it for each file
> separate. I mean say take a portion of 500 files a once.
> =
Hi,
2 points:
(1) Don't use 'ls *' , use 'ls' or 'ls -R'
(2) The general solution to this problem is to use the xargs command.
See the man page.
Good luck,
Bob
-- =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Bob Vickers R.Vickers@rhbnc.ac.uk
Dept of Computer Science, Royal Holloway College, University of London
WWW: http://www.dcs.rhbnc.ac.uk/%7Ebobv/
Phone: +44 1784 443691
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-04-10 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-10 4:00 command_XXX: Arg list too long Slavisa Lukic
1997-04-10 4:00 ` D. Sean Davidson
1997-04-10 4:00 ` Bob Vickers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox