From owner-freebsd-questions Wed Oct 31 14:35: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id B030E37B401 for ; Wed, 31 Oct 2001 14:35:04 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id f9VMZ1h62030; Wed, 31 Oct 2001 16:35:01 -0600 (CST) (envelope-from dan) Date: Wed, 31 Oct 2001 16:35:01 -0600 From: Dan Nelson To: Peter Brezny Cc: freebsd-questions@FreeBSD.ORG Subject: Re: pulling specific files out of a huge tar archive Message-ID: <20011031163500.A50504@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Oct 31), Peter Brezny said: > back before tar had bzip built in, to extract files that had been tarred and > compressed with bzip, i would run a command like this > > bunzip2 < /location/of/file.tar.bz2 | tar xvfp - home/www/data/* > > But I don't really know how to put that into action since i'm just dealing > with the tar command now. > > i tried tar tvzf /locations/of/source/file /director/to/restore That should work, although for bzipped inputs you want j instead of z. You might also have to strip the leading slash from the patchname you're restoring. The best way to test is list the tarfile, and try extracting the very first file. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message