Why does the `find` command use a single dash for multicharacter options?
Is there any reason why the find
command goes against the convention
of using double dashes for multiple character options?
I mean, for example, why
find -name "my_file.*"
rather than
find --name "my_filename.*"
As @muru said:
Those are not options, but tests, and we already have a convention of multi-character test names with single hyphens - the shell's
[
/test
command's tests.
It's simply history. Don't over-interpret those things; back when those old Unix commands were invented, there were no conventions, at least not anyway as strong as today. Everybody was doing his own thing. It took a long time until all that was settled, and by that time it was so established that there would have been an outcry, and a lot of carefully hand-crafted scripts would have broken, if there would have been a movement to unify those things.