"Otto Maddox" <[EMAIL PROTECTED]> writes: >I'm trying to write a wrapper around GNU Tar which determines the >stored permissions, owner, group and name of each file in the archive.
>Does anyone know of any tools, or have any hints, for listing the >contents of the archive in a more easily parsable way? I've read >about file formats in chapter 8 of the Tar manual, but I don't really >want to write a C program, if I can avoid it. There is no C or whatever program, which could be written to parse the output of $ tar -tvf Look at this example. Execute it in an empty directory: $ ln -s -- link 'file ->' && ln -s -- '-> link' file && \ tar -c -f - . | LC_ALL=C tar -tvf - drwx------ helmut/helmut 0 2006-01-12 06:30:47 ./ lrwxrwxrwx helmut/helmut 0 2006-01-12 06:30:31 ./file -> -> link lrwxrwxrwx helmut/helmut 0 2006-01-12 06:30:47 ./file -> -> link As you can see, one cannot distinguish the two symlinks 'file ->' and 'file'. Sorry. tar -tvf is broken by design. So you can't help looking into the tape archive yourself. Tar -tvf does not do its job. Helmut -- Wenn Sie mir E-Mail schreiben, stellen | When writing me e-mail, please Sie bitte vor meine E-Mail-Adresse | precede my e-mail address with meinen Vor- und Nachnamen, etwa so: | my full name, like Helmut Waitzmann <[EMAIL PROTECTED]>, (Helmut Waitzmann) [EMAIL PROTECTED] _______________________________________________ Bug-tar mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-tar
