[ale] Bash script
DjPfulio at jdpfu.com
DjPfulio at jdpfu.com
Sat Apr 12 18:58:19 EDT 2025
The answer is stdout versus standard error.
On April 12, 2025 6:26:32 PM EDT, Ron via Ale <ale at ale.org> wrote:
>Boris Borisov via Ale wrote on 2025-04-12 14:42:
>
>> I'm trying to list all files on SSD disk (Windows) and to find the oldest file and the newest file.
>
>Here's something that can be get the newest and oldest files - further tweaking should be able to craft it into a single command:
>
>
>## Newest:
>find $mount_point -type f -exec ls -lta {} \+ | head -n 1
>
>## Oldest:
>find $mount_point -type f -exec ls -lta {} \+ | tail -n 1
>
>
>Bonus points to anyone who can explain why the `head` results include the one file plus this:
>
>> find: ‘ls’ terminated by signal 13
>
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>https://mail.ale.org/mailman/listinfo/ale
>See JOBS, ANNOUNCE and SCHOOLS lists at
>http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20250412/849be865/attachment.htm>
More information about the Ale
mailing list