tar: Failed to open '/dev/sa0'

Polytropon freebsd at edvax.de
Sun Jun 18 20:48:31 UTC 2017


On Sun, 18 Jun 2017 11:59:07 -0700, David Christensen wrote:
> 2017-06-18 11:52:44 dpchrist at 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 at 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 at 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, ...


More information about the freebsd-questions mailing list