Is there any established order for 'ls' arguments?

Viewed 172

I'm a student and as part of my cursus I must recode the lscommand and reproduce its behaviour the best possible.

On Mac (El Capitan 10.11.6), using the terminal iTerm 2(zsh), I get:

user> ls . -R
ls: -R: No such file or directory

And on Arch (latest version), using the default text interface(bash) I get:

user> ls . -R
<current directory content>

Although I'd rather trust Arch, is it correct for ls to refuse its option after a directory has been specified ? And is there any documentation declaring the arguments order ?

1 Answers
Related