[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Each option has at least one long (or mnemonic) name starting with two
dashes in a row, e.g., ‘--list’. The long names are more clear than
their corresponding short or old names. It sometimes happens that a
single long option has many different names which are
synonymous, such as ‘--compare’ and ‘--diff’. In addition,
long option names can be given unique abbreviations. For example,
‘--cre’ can be used in place of ‘--create’ because there is no
other long option which begins with ‘cre’. (One way to find
this out is by trying it and seeing what happens; if a particular
abbreviation could represent more than one option, tar
will tell
you that that abbreviation is ambiguous and you’ll know that that
abbreviation won’t work. You may also choose to run ‘tar --help’
to see a list of options. Be aware that if you run tar
with a
unique abbreviation for the long name of an option you didn’t want to
use, you are stuck; tar
will perform the command as ordered.)
Long options are meant to be obvious and easy to remember, and their meanings are generally easier to discern than those of their corresponding short options (see below). For example:
$ tar --create --verbose --blocking-factor=20 --file=/dev/rmt0
gives a fairly good set of hints about what the command does, even
for those not fully acquainted with tar
.
Long options which require arguments take those arguments
immediately following the option name. There are two ways of
specifying a mandatory argument. It can be separated from the
option name either by an equal sign, or by any amount of
white space characters. For example, the ‘--file’ option (which
tells the name of the tar
archive) is given a file such as
‘archive.tar’ as argument by using any of the following notations:
‘--file=archive.tar’ or ‘--file archive.tar’.
In contrast, optional arguments must always be introduced using an equal sign. For example, the ‘--backup’ option takes an optional argument specifying backup type. It must be used as ‘--backup=backup-type’.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on August 23, 2023 using texi2html 5.0.