Last Updated: September 27, 2019
·
2.612K
· minivan

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 -