--On Thursday, March 11, 2004 2:30 PM -0500 Joshua Baker-LePain <[EMAIL PROTECTED]> wrote:

[snip]

Maybe I should try dd with bs=16M?  But will that pad the output file
with  an unacceptable-to-tar chunk at the end since the tapefile is
unlikely to  be an exact multiple of 16M?

In my experience, dd should read in chunks of 16M but the last block (incomplete) will not be filled in (padded) to complete the block.


Even if it was, here is what my gnu tar thinks of a tar with garbage at the end:

-------
[EMAIL PROTECTED](p1)(0):~/tartest% tar czvf foo.tar.gz foo
foo/
foo/bar/
foo/bar/baz/
[EMAIL PROTECTED](p1)(0):~/tartest% ls -l foo.tar.gz
-rw-r--r--    1 areid    staff         152 Mar 11 14:42 foo.tar.gz
[EMAIL PROTECTED](p1)(1):~/tartest% dd if=/dev/zero of=blank bs=1k count=10
10+0 records in
10+0 records out
[EMAIL PROTECTED](p1)(0):~/tartest% ls -l
total 16
-rw-r--r--    1 areid    staff       10240 Mar 11 14:43 blank
drwxr-xr-x    3 areid    staff         102 Mar 11 14:42 foo/
-rw-r--r--    1 areid    staff         152 Mar 11 14:42 foo.tar.gz
[EMAIL PROTECTED](p1)(0):~/tartest% cat foo.tar.gz blank > test.tar.gz
[EMAIL PROTECTED](p1)(0):~/tartest% tar tzf test.tar.gz

gzip: stdin: decompression OK, trailing garbage ignored
foo/
foo/bar/
foo/bar/baz/
tar: Child returned status 2
tar: Error exit delayed from previous errors
[EMAIL PROTECTED](p1)(2):~/tartest%
---

Yes, it does return '2' but the data has been extracted already.

Actually, come to think of it, gzip is ignoring the garbage..

-----
[EMAIL PROTECTED](p1)(0):~/tartest% gunzip foo.tar.gz
[EMAIL PROTECTED](p1)(0):~/tartest% cat foo.tar blank > test.tar
[EMAIL PROTECTED](p1)(0):~/tartest% tar tvf test.tar
drwxr-xr-x areid/staff       0 2004-03-11 14:42:08 foo/
drwxr-xr-x areid/staff       0 2004-03-11 14:42:08 foo/bar/
drwxr-xr-x areid/staff       0 2004-03-11 14:42:08 foo/bar/baz/
[EMAIL PROTECTED](p1)(0):~/tartest%
-----

Tar doesn't even complain on my system here:
tar (GNU tar) 1.13.25



Thanks.

--
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University


Just my 2cents..
antoine

--
Antoine Reid
Administrateur Syst�me - System Administrator

__________________________________________________

Logient Inc.
Solutions de logiciels Internet - Internet Software Solutions
417 St-Pierre, Suite #700
Montr�al (Qc) Canada H2Y 2M4
T. 514-282-4118 ext.32
F. 514-288-0033
www.logient.com

*AVIS DE CONFIDENTIALIT�*
L'information apparaissant dans ce message est l�galement privil�gi�e et
confidentielle. Elle est destin�e � l'usage exclusif de son destinataire
tel qu'identifi� ci-dessus. Si ce document vous est parvenu par erreur,
soyez par la pr�sente avis� que sa lecture, sa reproduction ou sa
distribution sont strictement interdites. Vous �tes en cons�quence pri� de
nous aviser imm�diatement par t�l�phone au (514) 282-4118 ou par courriel.
Veuillez de plus d�truire le message. Merci.

*CONFIDENTIALITY NOTE*
This message along with any enclosed documents are confidential and are
legally privileged. They are intended only for the person(s) or
organization(s) named above and any other use or disclosure is strictly
forbidden. If this message is received by anyone else, please notify us at
once by telephone (514) 282-4118 or e-mail and destroy this message. Thank
you.




Reply via email to