-M is 40% faster than (stat)[9], no wonder, it does look only at modification time and doesn't build a list.It doesn't build a list but it stores all the values from stat. From the -X man page:
If any of the file tests (or either the "stat" or "lstat" operators) are given the special filehandle consisting of a solitary underline, then the stat structure of the previous file test (or stat operator) is used, saving a system call.So when you use -M _ or -f _ you are retrieving the stored values from the previous stat or file test.
In reply to Re^2: grab newest file
by jwkrahn
in thread grab newest file
by hasimir44
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |