introduce find function as a replacement for ls
Using ls
with a wildcard, for example ls /dir1/dir2/*.txt
has a length limitation. If the number of files is huge, the following error is expected:
sh: /bin/ls: Argument list too long
I have encountered this error when producing 2D contour plot.
To solve the problem, I introduced a find
fuction. This function will not produce the aforemntioned breaking error and is versatile for other uses.