Date: Sun, 18 Jun 2017 22:48:13 +0200 From: Polytropon <freebsd@edvax.de> To: David Christensen <dpchrist@holgerdanske.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170618224813.4b11a480.freebsd>