bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] can't deal with junk in front or back


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] can't deal with junk in front or back
Date: Fri, 19 Dec 2003 12:52:41 +0200

> Disappointed that junk in front can't be dealt with:
> 
> $ tar c /etc/motd /etc/motd|{ echo xxxxxxx; cat;}|tar tv
> tar: Removing leading `/' from member names
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Error exit delayed from previous errors
> 
> Couldn't it find the next header then like it said?

Exactly. No tar will ever be able to handle such a leading junk, unless
its size is divisible by block size:

$ tar c /etc/motd /etc/motd|{ dd if=/dev/zero bs=512 count=1; cat - ) | tar tvi
tar: Removing leading `/' from member names
1+0 records in
1+0 records out
-rw-r--r-- root/root        14 2003-07-25 17:32:24 etc/motd
-rw-r--r-- root/root        14 2003-07-25 17:32:24 etc/motd

> Disappointed that trailing junk isn't even mentioned

You are right, I'll fix that.

> 
> [Maybe also identical archive names could be warned to stderr.]
> 

I don't think so. Duplicate file names are quite common in tar
archives...

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]