On 2025-10-30 22:36:01 -0700, Michael Paoli wrote: > Notably on Debian 12 and using the ls from coreutils, > and with or without such an alias, I can easily get results like: > $ ls *.pdf > ls: unrecognized option '--K.pdf' > Try 'ls --help' for more information. > $ > Notably I'm unable to find a way to, as OP presumably invoked, > get ls from coreutils to complain about option '--K', > but rather only the name of the file (interpreted as option) > starting with --K and ending with .pdf extension. > Also, the diagnostic is also quite different - "Invalid option" vs. > "unrecognized option".
I'm wondering whether the error message has been copy-pasted or there has been a confusion from the OP. BTW, I'm surprised by the change of the error message: $ ls -K ls: invalid option -- 'K' Try 'ls --help' for more information. $ ls --K ls: unrecognized option '--K' Try 'ls --help' for more information. Ditto with busybox ls. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

