[TOM] wrote:Ich bezweifel allerdings, dass man ohne das - die Reihenfolge immer und beliebig tauschen kann. Versuch das mal mit einem zusätzlichen -C (habs nicht getestet).
Die C Optionen werden hintereinander ausgeführt, sind also logischerweise nicht vertauschbar. Aber das gilt natürlich für beide Modi:
Code: Select all
tar -C test2 -C test3 -c -f xxx.tar.gz x
ist äquivalent zu
Hier noch mal die info-pages:
Short Option Style
Most options also have a short option name. Short options start with
a single dash, and are followed by a single character, e.g. `-t' (which
is equivalent to `--list'). The forms are absolutely identical in
function; they are interchangeable.
The short option names are faster to type than long option names.
Short options which require arguments take their arguments
immediately following the option, usually separated by white space. It
is also possible to stick the argument right after the short option
name, using no intervening space. For example, you might write
`-f archive.tar' or `-farchive.tar' instead of using
`--file=archive.tar'. Both `--file=ARCHIVE-NAME' and `-f ARCHIVE-NAME'
denote the option which indicates a specific archive, here named
`archive.tar'.
Short options' letters may be clumped together, but you are not
required to do this (as compared to old options; see below). When short
options are clumped as a set, use one (single) dash for them all, e.g.
``tar' -cvf'. Only the last option in such a set is allowed to have an
argument(1).
When the options are separated, the argument for each option which
requires an argument directly follows that option, as is usual for Unix
programs. For example:
$ tar -c -v -b 20 -f /dev/rmt0
If you reorder short options' locations, be sure to move any
arguments that belong to them. If you do not move the arguments
properly, you may end up overwriting files.
---------- Footnotes ----------
(1) Clustering many options, the last of which has an argument, is a
rather opaque way to write options. Some wonder if GNU `getopt' should
not even be made helpful enough for considering such usages as invalid.
Und:
Old Option Style
_(This message will disappear, once this node revised.)_
Like short options, old options are single letters. However, old
options must be written together as a single clumped set, without
spaces separating them or dashes preceding them(1). This set of
letters must be the first to appear on the command line, after the
`tar' program name and some white space; old options cannot appear
anywhere else. The letter of an old option is exactly the same letter
as the corresponding short option. For example, the old option `t' is
the same as the short option `-t', and consequently, the same as the
mnemonic option `--list'. So for example, the command `tar cv'
specifies the option `-v' in addition to the operation `-c'.
When options that need arguments are given together with the command,
all the associated arguments follow, in the same order as the options.
Thus, the example given previously could also be written in the old
style as follows:
$ tar cvbf 20 /dev/rmt0
Here, `20' is the argument of `-b' and `/dev/rmt0' is the argument of
`-f'.
On the other hand, this old style syntax makes it difficult to match
option letters with their corresponding arguments, and is often
confusing. In the command `tar cvbf 20 /dev/rmt0', for example, `20'
is the argument for `-b', `/dev/rmt0' is the argument for `-f', and
`-v' does not have a corresponding argument. Even using short options
like in `tar -c -v -b 20 -f /dev/rmt0' is clearer, putting all
arguments next to the option they pertain to.
If you want to reorder the letters in the old option argument, be
sure to reorder any corresponding argument appropriately.
This old way of writing `tar' options can surprise even experienced
users. For example, the two commands:
tar cfz archive.tar.gz file
tar -cfz archive.tar.gz file
are quite different. The first example uses `archive.tar.gz' as the
value for option `f' and recognizes the option `z'. The second
example, however, uses `z' as the value for option `f'--probably not
what was intended.
Old options are kept for compatibility with old versions of `tar'.
This second example could be corrected in many ways, among which the
following are equivalent:
tar -czf archive.tar.gz file
tar -cf archive.tar.gz -z file
tar cf archive.tar.gz -z file
As far as we know, all `tar' programs, GNU and non-GNU, support old
options. GNU `tar' supports them not only for historical reasons, but
also because many people are used to them. For compatibility with Unix
`tar', the first argument is always treated as containing command and
option letters even if it doesn't start with `-'. Thus, `tar c' is
equivalent to `tar -c': both of them specify the `--create' (`-c')
command to create an archive.
---------- Footnotes ----------
(1) Beware that if you precede options with a dash, you are
announcing the short option style instead of the old option style;
short options are decoded differently.
(Emphasis added)
Jetzt düften wohl alle Unklarheiten beseitigt sein...