I always use `find .` if I need a list of files from a directory for this reason
I always use `find .` if I need a list of files from a directory for this reason
So for the limited subset of tasks where you're ok with using a tool that might not be installed and need options that requires stat calls and the directories may be large enough, it might make a difference.
https://en.wikipedia.org/wiki/Infinitesimal
"In mathematics, an infinitesimal or infinitesimal number is a quantity that is closer to zero than any standard real number, but that is not zero."
I'll blame this one on auto-correct.
s/simal//
There, FTFY.If you really need regex you can use -regex or -iregex, but be aware that they match the entire path (so if you do "find ." you will be matching a string that starts with "./"
EDIT: Also note that "find ..." is also not safe from all the quoting issues without "-print0" or equivalent options to make it separate the names with ASCII NUL rather than linefeed or otherwise taking steps to handle filenames with actual linefeeds in them.
*
which is how filename expansion is supposed to work.echo *
However as per replies, this suffers from the same issues as ls.
$ echo /tmp/*
/tmp/bspwm_0_0-socket /tmp/config-err-Q667kI /tmp/foolog /tmp/ space /tmp/...
Parse that output and you get a broken list of filenames.