prtwaa
2.164K
· November 2012 ·
14e24eae4916ac746e404c4bceb44973

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

Web Engineer
·
Remote within the United States
·
Full Time
Search all programming jobs