Paul L. Snyder on 10 May 2005 03:35:56 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Tutorials


Quoting Stephen Gran <steve@lobefin.net>:

> On Mon, May 09, 2005 at 11:08:39PM -0400, Mark M. Hoffman said: 
> > * Jon Nelson <quincy@linuxnotes.net> [2005-05-06 15:14:57 -0400]:
> >
> > >     $ find ../dir1/ | xargs tar cvf test.tar
> > 
> > Ugh, no.  The xargs man page says:
> 
> Just use expansion:
> tar $options test.tar $(find ../dir1/)
> 
> Right?

If you have a lot of files generated by the find command you'll run into
command line length limits.  (On some UNIX systems [though hopefull not
too many modern ones] the limit could be as low as 255 characters!)  The
exact limit depends on OS, shell, and compilation options for both.  I
think it's at least 32k for bash on Linux, but you could still hit that
if, say, you were using tar for a backup script.

Hm, not sure where to check to find the exact value without mucking around
in source.  Anyone know offhand?

pls
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug