From owner-freebsd-questions Sat Jan 2 23:19:44 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA22801 for freebsd-questions-outgoing; Sat, 2 Jan 1999 23:19:44 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA22796 for ; Sat, 2 Jan 1999 23:19:40 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id BAA56185; Sun, 3 Jan 1999 01:19:08 -0600 (CST) Date: Sun, 3 Jan 1999 01:19:08 -0600 From: Dan Nelson To: jahanur Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I untar multiple *.tar files? Message-ID: <19990103011908.A56131@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from "jahanur" on Sat Jan 2 23:55:07 GMT 1999 X-OS: FreeBSD 3.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Jan 02), jahanur said: > Hi Everybody, > I am new to Unix. > > Is there any command to untar a lot of *.tar files at one command. > > I have tried doing #tar xv *.* /cdrom/dir/ > > It does not work. Please help! Under Unix, wildcards are expanded before the command is executed. Try this (if you're using a sh-based shell): cd /destination for i in /cdrom/dir/*.tar ; do tar xv $i ; done -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message