💻 Software
Unix/Linux find and sort by date modified
Fresh5 days ago
Mar 15, 2026334190 viewsConfidence Score1%
1%
Problem
How can I do a simple which would order the results by most recently modified? Here is the current I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): 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.)
Error Output
find '$dir' -name '$str'\* -print | head -10
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Unix/Linux find and sort by date modified
Low Risk
Use this: arguments from : : File's last modification time in the format specified by . : seconds since Jan. 1, 1970, 00:00 GMT, with fractional part. : locale's date and time (Sat Nov 04 12:02:33 EST 1989). : File's name.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix