Solved what is the difference between options with - and options with --?

Depends on context. In some cases -- is often used to denote a longer function vs. - to denote a shortcut. A good example would be gpg(1):

Code:
       --help

       -h     Print a usage message summarizing the most useful  command  line
              options.  Note that you cannot abbreviate this command.
However, sometimes -- is also used to provide extra parameters for an embedded command. Sort of an escape so to speak, though it isn't used too often.
 
You use -- to stop processing options, this is useful for example to delete a file beginning with a dash. It would otherwise be interpreted as an option:
rm -f -- -dashfile
 
Back
Top