Helmut Waitzmann <[EMAIL PROTECTED]> wrote: > You are right: > $ printf '%s\n' -C nothing | tar --files-from=- -c -f archive.tar > tar: nothing: Cannot chdir: No such file or directory > tar: Error is not recoverable: exiting now > > $ printf '%s\0' -C nothing | tar --files-from=- -c -f archive.tar --null
Well, piping file list to `tar -T' requires some special care anyway, it's not only dashes that can cause the confusion, non-ascii symbols or characters below ascii 32 can make -T malfunction as well. I'd recommend using 0 as file list separator in this case, as you did in your second try (find -print0 . | tar -T- ...). This causes tar to disable any special handling of file list contents and to assume each list entry is a file name. By the way, you need not specify --null explicitely: if the input list is zero-separated, tar will enable this option automatically. > Will this behavior stay the same with new gnu tar, too? I see nothing particularly wrong in handling options coming from the file list, on the contrary, it is a very useful feature and actually it appeared because there was a demand for this case of functionality. Besides, it is easy to turn it off, and for the case when producing zero-separated lists is somehow undesirable, I will provide a --literal-file-from option, proposed by Matt. Regards, Sergey _______________________________________________ Bug-tar mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-tar
