Quantcast
Channel: User Thomas - Ask Ubuntu
Viewing all articles
Browse latest Browse all 41

Answer by Thomas for tar using short form option versus old style

$
0
0

Because that is the way the different option styles work and they behave differently.


The man page states for UNIX or short-option style, the one which is prefixed with a single dash.

Any number of options not taking arguments can be clustered together after a single dash, e.g. -vkp. Options that take arguments (whether mandatory or optional), can appear at the end of such a cluster, e.g. -vkpf a.tar.


The traditional style option style, the one without dashes:

In traditional style, the first argument is a cluster of option letters and all subsequent arguments supply arguments to those options that require them. The arguments are read in the same order as the option letters. Any command line words that remain after all options has been processed are treated as non-optional arguments: file or archive member names.


As you can see, the UNIX or short-option style expects arguments to options directly after the option.
Whereas the traditional style option style expects a block of options and suitable arguments to the options in the right order.


Viewing all articles
Browse latest Browse all 41

Trending Articles