It seems that ls doesn’t sort the files correctly when doing a recursive call:

ls -altR . | head -n 3

How can I find the most recently modified file in a directory (including subdirectories)?

21 Answers
21

Leave a Reply

Your email address will not be published. Required fields are marked *