I am trying to list all files with a name of 3 characters in /usr/bin.
ls ??? should do exactly that, but it lists every file in the directory.
Note that ls ???? works as intended, showing only the files with a name of 4 characters. It also works with 1, 2, 5 and literally every number other than 3.
Steps to reproduce:
- go to
/usr/bin - type
ls ???
ls -d ???works as intended. – sudodus Nov 13 '21 at 15:30lsare you running?type lsandls --version? The GNU one on the one box I tried doesn't follow the symlink with that command, and e.g.ls -l X11shows the link, whilels -l X11/shows the contents of the dir behind the link. (which is different for a regular directory)ls -Hwould change that, though. – ilkkachu Nov 13 '21 at 15:35ls -l ???works OK for me. – sudodus Nov 13 '21 at 15:39X11:and then all the file names. – Gilles 'SO- stop being evil' Nov 13 '21 at 15:49