On Wednesday 02 February 2011 20:58, Cathey, Jim wrote:
> ># find . -depth -print | pax -wd > outfile.tar
> >
> >That would be more portable (not all systems have /proc)
> 
> Not all systems have a nice place you can safely write
> a list file, either.  One would also need to arrange to clean
> up this file afterwards, and to make sure it was not included
> in the list itself, or else is given to tar as an exclusion.
> Ideally the list file is auto-generated, and's a name that can
> never collide.  mktemp stuff.
> 
> Either way, potential complications.  I'm still trying
> to get used to /proc/self/fd/0 versus /dev/stdin!

find . -depth -print | tar ... -T -

but you need a small fix for -T - to read stdin:
-- 
vda

diff -ad -urpN busybox.5/archival/tar.c busybox.6/archival/tar.c
--- busybox.5/archival/tar.c    2011-01-31 05:50:34.000000000 +0100
+++ busybox.6/archival/tar.c    2011-02-03 03:59:05.000000000 +0100
@@ -655,7 +655,7 @@ static llist_t *append_file_list_to_list
        llist_t *newlist = NULL;
 
        while (list) {
-               src_stream = xfopen_for_read(llist_pop(&list));
+               src_stream = xfopen_stdin(llist_pop(&list));
                while ((line = xmalloc_fgetline(src_stream)) != NULL) {
                        /* kill trailing '/' unless the string is just "/" */
                        char *cp = last_char_is(line, '/');



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to