Friday 18 August 2017

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified?


Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables):


find '$dir' -name '$str'\* -print | head -10

How could I have this order the search by most recently modified? (Note I do not want it to sort 'after' the search, but rather find the results based on what was most recently modified.)

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...