I've read that all multi-character command options must be preceded by a double dash (--). But many flags for the find command (e.g. -name or -type) are preceded by only one dash. Why is that?

closed as too broad by Romeo Ninov, Stephen Rauch, Rui F Ribeiro, Archemar, user34720 Jul 7 '17 at 16:46

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This convention was initially created by GNU and used by getopt_long. Not all unix tools use it. java and X are notable exceptions – user996142 Jul 7 '17 at 15:08

It's just a GNU style convention to precede double dashes for long options, not a 'must'. GNU programs using only one dash for long options are (mostly) from the time where the GNU C library did not yet support getopt_long to parse arguments in today's fashion.

Not the answer you're looking for? Browse other questions tagged or ask your own question.