Dateianzahl limits in bash?
Boris Halter
boris.halter at servsystems.de
Fri Oct 17 11:31:23 CEST 2003
Hi,
On Thu, 2003-10-16 at 19:47, Florian Lohoff wrote:
[...]
> > Aber wenn ich z.B. die zu archivierenden Dateien ueber Joker in der
> > Form aaaa*.txt angebe kommt eine Fehlermeldung der bash, welche ich
> > irgendwie als Speicherbelegungsproblem deute.
>
> Du hast in der bash ein command line limit - Ein joker wird nicht etwa
> von tar sondern von der bash geglobbed (expanded) d.h. wenn alle
> dateinamen mit aaaa*.txt mehr als dieses limit ist bricht die bash ab.
>
> > Die genaue Fehlermeldung habe ich leider momentan nicht vorliegen,
> > aber vielleicht kann mir jemand sagen, ob es da prinzipielle
> > Grenzen gibt.
>
> Ja - gibt es - ich weiss aber nicht ob man die so einfach erhoehen kann.
xargs ist dein Freund.
man xargs:
xargs reads arguments from the standard input, delimited by blanks
(which can be protected with double or single quotes or a backslash) or
newlines, and executes the command (default is /bin/echo) one or more
times with any initial-arguments followed by arguments read from
standard input.
Versuchs mal mit:
find /pfad/zum/sichern -type f | grep -v "evtl. auszuschließendes
Verzeichnis" | xargs tar cvf /tmp/xxx.tar
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lug-owl.de/pipermail/linux/attachments/20031017/10e1ab52/attachment.sig>
More information about the Linux
mailing list