From owner-freebsd-questions@FreeBSD.ORG Thu Nov 6 14:47:51 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E24F16A4CE for ; Thu, 6 Nov 2003 14:47:51 -0800 (PST) Received: from mta4.adelphia.net (mta4.adelphia.net [68.168.78.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 399FD43F93 for ; Thu, 6 Nov 2003 14:47:50 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from moo.holy.cow ([69.160.64.204]) by mta4.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031106224753.LMRL20580.mta4.adelphia.net@moo.holy.cow>; Thu, 6 Nov 2003 17:47:53 -0500 Received: by moo.holy.cow (Postfix, from userid 1001) id D6764A9D6; Thu, 6 Nov 2003 17:51:38 -0500 (EST) Date: Thu, 6 Nov 2003 17:51:38 -0500 From: parv To: Martin McCormick Message-ID: <20031106225138.GA1432@moo.holy.cow> Mail-Followup-To: Martin McCormick , freebsd-questions@freebsd.org References: <200311062200.hA6M0uLH074820@dc.cis.okstate.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311062200.hA6M0uLH074820@dc.cis.okstate.edu> cc: freebsd-questions@freebsd.org Subject: Re: Extracting individual Files via tar X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 22:47:51 -0000 in message <200311062200.hA6M0uLH074820@dc.cis.okstate.edu>, wrote Martin McCormick thusly... > > 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 You forgot the bit about default file... -f [hostname:]file --file [hostname:]file Read or write the specified file (default is /dev/sa0). If a hostname is specified, tar will use rmt(8) to read or write the specified file on a remote machine. ``-'' may be used as a file- name, for reading or writing to/from stdin/stdout. ...try this instead... tar zxf /usr/local/src/ports.tar.gz ports/print/pstotext/ - Parv --