skip to Main Content

How can I find the most recently modified *.ipynb files in the subtree starting from the current directory? Ideally I would like a sorted list with the most recently modified ones shown first.

I am using Ubuntu 22.04 and am happy to use GNU tools.

2

Answers


  1. Like this with :

    (shopt -s globstar; ls -lt **/*.ipynb)
    
    Login or Signup to reply.
  2. You can use find with -newermt option as below.

    The below command finds the files modified in the last 24 hours.

    find . -type f -newermt "-24 hours" 
    

    Similarly,

    find . -type f -newermt "-10 minutes" 
    find . -type f -newermt "1 day ago" 
    find . -type f -newermt "yesterday"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search