From owner-freebsd-questions Fri Oct 19 14:35:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailf.telia.com (mailf.telia.com [194.22.194.25]) by hub.freebsd.org (Postfix) with ESMTP id 3DD5137B405 for ; Fri, 19 Oct 2001 14:35:26 -0700 (PDT) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailf.telia.com (8.11.6/8.11.6) with ESMTP id f9JLZOK26507 for ; Fri, 19 Oct 2001 23:35:24 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id XAA07137 for ; Fri, 19 Oct 2001 23:35:21 +0200 (CEST) Received: (qmail 15233 invoked by uid 1001); 19 Oct 2001 21:35:19 -0000 Date: Fri, 19 Oct 2001 23:35:18 +0200 From: Erik Trulsson To: legg@iastate.edu Cc: freebsd-questions@freebsd.org Subject: Re: tar on 4.3-RELEASE (fwd) Message-ID: <20011019233518.A15174@student.uu.se> Mail-Followup-To: legg@iastate.edu, freebsd-questions@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i 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 On Fri, Oct 19, 2001 at 04:23:46PM -0500, legg@iastate.edu wrote: > DUH - I am a real anti-nerd today. I wrote to the list, but forgot to > state the problem I was having. My sincerest apologies. > > PROBLEM: Why is this error message appearing? In this instance, tar is > only being used to de-arc a file. I don't need anything sent to a device. > Is there a reason why it is set up like this? > > > > When I use tar as a user (as opposed to root), I get complaints that I > don't have permissions to /dev/sa0/. I find this peculiar as I don't have > a tape drive on my machine. > > tar -t (view contents of file), tar -c (create file), tar -x (extract > file; they all generate this error. > > stdout.txt - a script of all standard input/output > as I demonstrate this error. If you do not specify the name of the archive tar will, by default, assume that it is on tape. On /dev/sa0 to be specific. (Remember taht tar stands for Tape ARchiver.) The solution is of course to specify the name of the tar archive. This is done with the -f flag. So to view the contents of a tar file use: tar tvf file.tar (The 'v' option is optional but recommended. It gives a more verbose output.) To extract a .tar archive use tar xvf file.tar And to create one use tar cvf file.tar file1 file2 file3 where file1,file2,file3 are the file you want to put in the archive. (And, no, you do not need to use a '-' sign in front of the options for tar. You can but it is not necessary.) -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message