[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] Parsing the output of `tar tvf'
From: |
Joerg Schilling |
Subject: |
Re: [Bug-tar] Parsing the output of `tar tvf' |
Date: |
Thu, 12 Jan 2006 14:03:11 +0100 |
User-agent: |
nail 11.2 8/15/04 |
Helmut Waitzmann <address@hidden> wrote:
> $ 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.
tar has not been designed for this usage but as GNU tar is a tar clone it could
add the apropriate extensions via new options.
star gives you two way to deal with your problem:
1)
star -t -tpath < archive.tar
2)
star -t -find -print -false < archive.tar
or even:
star -t -find -ls -false < archive.tar
Jörg
--
EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
address@hidden (uni)
address@hidden (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily