· November 2012 ·

Find recursively and sort by last modified

ls has the -t switch, that enables sorting by last modified. However, often we want to find recursively and get to that file that we last edited a year ago. That's fine, since we can do

ls -t $(find .)

We can have more versions of that, too. If we want the full info, we ca change it to

ls -lt $(find .)

Or, if we'd like to look only through directories, we can use

ls -ltd $(find .)

We can even pipe it to view and open the needed files in view!

ls -t $(find .) | view -
Sign in or sign up to add your response.
Featured Programming Job

Show off your talent and get hired too!
Stockholm, Sweden
Full Time
Search all programming jobs