What are those double-dash (--) options in man?
When I look at man pages, most commands seem to have some options listed with a double dash "--" in front of them.
For instance, man rpm lists options: --quiet Print as little as possible -v Verbose Why does the Verbose option use one dash but the Quiet option use two? Thanks in advance, Utah |
As far as I can tell, switches that use a letter (like -a) only need a dash, but those that use a word, don't. But I have no idea why - probably something from Unix.
|
They are gnu additions to the options to make some of them clearer. The man pages in Slackware make a distinction between industry standard POSIX options and the gnu ones each being under their own section.
|
You live and learn :)
|
I think additionally that single character options can be strung together on a single '-'.
For example... tar -xvzf source.tar.gz instead of (but is functionally the same as) tar -x -v -z -f source.tar.gz '--' options are actually single options that are more than one letter. So... tar --xvzf source.tar.gz would actually force the tar program to look for a single option named 'xvzf'. You can also mix and match, such as ls -al --co which will list all (-a) of the contents of the current directory in long (-l) format and apply color (--co) to the display based on the type of file listed on the screen. Hope that helped. |
All times are GMT -5. The time now is 11:27 PM. |