From owner-freebsd-questions@freebsd.org Sun Jun 18 20:48:31 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB2A8D8DB9F for ; Sun, 18 Jun 2017 20:48:31 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay11.qsc.de (mailrelay11.qsc.de [212.99.187.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFC3D7B717 for ; Sun, 18 Jun 2017 20:48:29 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay11.qsc.de; Sun, 18 Jun 2017 22:48:15 +0200 Received: from r56.edvax.de (port-92-195-68-124.dynamic.qsc.de [92.195.68.124]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id ED8763CBF9; Sun, 18 Jun 2017 22:48:14 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v5IKmDjL002729; Sun, 18 Jun 2017 22:48:13 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 18 Jun 2017 22:48:13 +0200 From: Polytropon To: David Christensen Cc: freebsd-questions@freebsd.org Subject: Re: tar: Failed to open '/dev/sa0' Message-Id: <20170618224813.4b11a480.freebsd@edvax.de> In-Reply-To: <9369978e-7041-3ef9-2cb4-66555054425b@holgerdanske.com> References: <9369978e-7041-3ef9-2cb4-66555054425b@holgerdanske.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay11.qsc.de with 3C7566A3562 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1291 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 20:48:31 -0000 On Sun, 18 Jun 2017 11:59:07 -0700, David Christensen wrote: > 2017-06-18 11:52:44 dpchrist@freebsd ~ > $ gtar c .thunderbird > dpchrist-thunderbird-20170618.tar > gtar: /dev/sa0: Cannot open: Operation not supported > gtar: Error is not recoverable: exiting now > > > BSD tar also fails: > > 2017-06-18 11:52:56 dpchrist@freebsd ~ > $ tar --version > bsdtar 3.2.1 - libarchive 3.2.1 zlib/1.2.8 liblzma/5.2.2 bz2lib/1.0.6 > > 2017-06-18 11:53:14 dpchrist@freebsd ~ > $ tar c .thunderbird > dpchrist-thunderbird-20170618.tar > tar: Failed to open '/dev/sa0' > > > What's the problem? The problem is that you didn't provide a file name. In this case, tar will default to $TAPE (if set), or the system's default tape drive, which is /dev/sa0 (sequential access #0). A file is provided along with the "f" parameter: $ tar cf dpchrist-thunderbird-20170618.tar .thunderbird If you want redirection, you can use "tar cf -" (output to stdout): $ tar cf - .thunderbird > dpchrist-thunderbird-20170618.tar The order doesn't matter ("tar cf" equals "tar fc"), but the file name required by "f" has to be provided prior to the source file(s) or directory. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...