[ale] Bash script

Ron admin at bclug.ca
Sat Apr 12 18:26:32 EDT 2025


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



More information about the Ale mailing list