Simply globbing .** shouldn't be allocating this much memory (I'm presuming you were in /?), so my guess is that it has to do with trying to pass them as arguments.
You are executing ls with each file fish finds as an argument, not passing * to ls (which doesn't support that concept). On Windows, dir * or dir *.exe does exactly what you are doing, and it's a common mistake for people on Linux to make.
If you want to use fish to list files, you can use printf '%s\n' .** (or whatever pattern you want), you don't need ls in there at all.
That doesn't explain the crash though, of course. Either it was an extremely memory constrained environment or there's some recursion here that fish isn't handling.
Heh. My dotdirs contain a symlink to the root of our fileserver, so my fish instance is currently at a resident set size of 1.4 GB and growing... 24 GB of RAM on this server so I might be alright, but maybe fish should stop expanding wildcards once it hits ARG_MAX?
fish, version 3.1.2
Linux a 5.7.9-1-MANJARO #1 SMP PREEMPT Thu Jul 16 08:20:05 UTC 2020 x86_64 GNU/Linux
I was trying to find some file type(zip) recursively. While wondering about
**/*.zipwould work for hidden files. Tried
What is recommend way in this case? Using find? or ...?
The text was updated successfully, but these errors were encountered: