Re: how do I extract a 2.6 gigabyte .tar.gz file ?

Darxus (darxus@Op.Net)
Thu, 29 Oct 1998 17:26:19 -0500 (EST)


Date: 29 Oct 1998 14:50:17 -0700

> Okay, I wrote this code based on a suggestion from the Kernel mailing
> list. Give it a shot and see what happens. You run it just like you
> would using cat, e.g.,
>
> readbytes file.tgz|gunzip -c|tar tf -
>
> The suggestion was that perhaps "open()" wasn't susceptible to the
> same problem as fopen(), which all the GNU utilities use and is in
> libc.

Interesting concept...

> I tried it on a small gzip'd tar file and it worked. Of course
> I can't offer any guarantees. It looks fine to me but I can't/won't
> accept responsibility if it does anything horrible like wipes out your
> file! :)

darxus@d-phletc1-12:~/tmp> ls -l index.tgz
-rw-r--r-- 1 darxus darxus 18731 Oct 29 17:12 index.tgz
darxus@d-phletc1-12:~/tmp> ./readbytes index.tgz | tar -ztvf -
drwxr-sr-x darxus/darxus 0 1998-10-13 17:51 index/
-rw-r--r-- darxus/darxus 183985 1998-10-03 07:49 index/ftp.netscape.com

Well, it works on a 183,985 byte file... neat.

darxus@d-phletc1-12:~/tmp> ls -l /mnt/c/linux/home.tgz
-rwxrwxr-x 1 root root 2666693212 Oct 10 21:10
/mnt/c/linux/home.tgz
darxus@d-phletc1-12:~/tmp> ./readbytes /mnt/c/linux/home.tgz | tar -ztvf -

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors

But still doesn't work on a 2.6gb file :/

------------------------------------------------------------

From: glhenni@cs.sandia.gov (Gary L. Hennigan)

> It goes through the vfs layer, when you give it a file that's sitting
> on the vfs layer, e.g., dd if=/usr/tmp/somefile.tgz. If you gave it a
> raw device then it would act accordingly. Unfortunately I have no idea
> how to find out where your file is actually sitting on the raw disk
> device and if you knew that whether or not you could use dd to get at
> it.

Well, I remembered seeing something somewhere that let me find the inode
number of a file, and found it in ls's man page. Any chance I can use an
inode number to tell dd where to find it ?
________________________________________________________________________
***PGP fingerprint = D5 EB F8 E7 64 55 CF 91 C2 4F E0 4D 18 B6 7C 27***
darxus@op.net / http://www.op.net/~darxus
Chaos reigns.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/