Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Nov 2003 16:00:56 -0600
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   Extracting individual Files via tar
Message-ID:  <200311062200.hA6M0uLH074820@dc.cis.okstate.edu>

next in thread | raw e-mail | index | archive | help
	The command

tar ztf  /usr/local/src/ports.tar.gz

produces a table of contents just like the man page says it should.
The man page also says that individual files can be recovered or
listed but I haven't gotten that to work at all. if I try:

$ tar zt ports/print/pstotext/ /usr/local/src/ports.tar.gz

tar (child): /dev/sa0: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
tar: Child returned status 2
tar: ports/print/pstotext: Not found in archive
tar: /usr/local/src/ports.tar.gz: Not found in archive
tar: Error exit delayed from previous errors

	In the successful test, tar obviously knew which specification
was the archive and was able to uncompress it with the z flag.  The
file specification I am attempting to recover from the archive throws
tar completely off.  I looked in the handbook and all the examples I
found were the more usual procedure of unpacking whole file systems
as in

tar zxf somedir/archive.tar.gz

	I'm not having trouble with that use of tar.

Thank you.

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Division Network Operations Group



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311062200.hA6M0uLH074820>