[ale] Bash script
Ron
admin at bclug.ca
Sun Apr 13 00:47:53 EDT 2025
Bob Toxen via Ale wrote on 2025-04-12 18:57:
> Y'all might want to test your code before offering it as a solution
> or note it as untested.
You might want to test it yourself before calling it out since it was
tested and it works.
Replacing `head` or `tail` with `less` will easily show that it works.
> On a *nix file system, files that are stored in a directory inode
> are NOT sorted. Thus, the "ls -lta {}" that is executed on each
> non- sorted entry will NOT be a list sorted by time. Oh, that is
> after you figure out that you need a trailing \; to terminate the -
> exec operator.
Did you completely miss the "\+" in the following?
>> find $mount_point -type f -exec ls -lta {} \+ | tail -n 1
It was used intentionally, can you figure out why?
Thanks, in a thread of completely wrong answers, this was pretty funny.
More information about the Ale
mailing list