by richfnelson · 9y ago · 0 comments
No you don't; whether ls is a builtin is mostly irrelevant, but
ls *1*.png
does exactly what you (I assume) are saying, dir *1*.png
which AFAIK is a new extension introduced with WinNT's command processor, since the old algorithm...https://blogs.msdn.microsoft.com/oldnewthing/20071217-00/?p=...
...would effectively produce a pattern matching all files ending in '.png'.
ls doesn't do glob matching. ls '*' would try to fstatat (FreeBSD) that character.
EDIT: formatting
It's very common to think of the first thing you learnt as more intuitive. Learning the second thing you have baggage and expectations of how something is supposed to work.