<html><head></head><body><div dir="auto">The answer is stdout versus standard error. </div><br><br><div class="gmail_quote"><div dir="auto">On April 12, 2025 6:26:32 PM EDT, Ron via Ale <ale@ale.org> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><div dir="auto">Boris Borisov via Ale wrote on 2025-04-12 14:42:<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><div dir="auto">I'm trying to list all files on SSD disk (Windows) and to find the oldest file and the newest file.<br></div></blockquote><div dir="auto"><br>Here's something that can be get the newest and oldest files - further tweaking should be able to craft it into a single command:<br><br><br>## Newest:<br>find $mount_point -type f -exec ls -lta {} \+  | head -n 1<br><br>## Oldest:<br>find $mount_point -type f -exec ls -lta {} \+  | tail -n 1<br><br><br>Bonus points to anyone who can explain why the `head` results include the one file plus this:<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><div dir="auto">find: ‘ls’ terminated by signal 13<br></div></blockquote><div dir="auto"><hr>Ale mailing list<br>Ale@ale.org<br><a href="https://mail.ale.org/mailman/listinfo/ale">https://mail.ale.org/mailman/listinfo/ale</a><br>See JOBS, ANNOUNCE and SCHOOLS lists at<br><a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br></div></pre></blockquote></div></body></html>