Neil Bothwick schrieb:
> On Fri, 30 Dec 2005 18:58:17 +0100, Alexander Skwar wrote:
> 
>> > tar outputs to stdout by default,
>> 
>> Not always.
> 
> From man tar

So, why do you suppose that the command is called
"tape (file) archiver"?

While you're right as far as GNU tar is concerned,
you're wrong as far as the default of tar is concerned.

Eg. see the man page of tar on hp-ux, 
<http://docs.hp.com/en/B2355-90690/tar.1.html>:

| f             
| Use the next arg argument as the name of the archive instead
| of the default, /dev/rmt/0m.

Or Solaris 10 
<http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9u1?q=tar&a=view>:

| f
|
|     File. Use the tarfile argument as the name of the tarfile. If
|     is specified, /etc/default/tar is not searched. If f is omitted,
|     tar will use the device indicated by the TAPE environment variable,
|     if set. Otherwise, tar will use the default values defined in
|     /etc/default/tar

> So "-f -" is unnecessary, but harmless.

No, "f" is necessary if you don't wish to rely on unknown
defaults. Even with GNU tar, you don't know FOR SURE if
"-f -" is the default. Who knows? Maybe DEFAULT_ARCHIVE
was set to something else while building?

Alexander Skwar
-- 
gentoo-user@gentoo.org mailing list

Reply via email to