find_recent_files() { find -type f -mmin -${1:-5}; }
This relies on findβs -mmin
argument
-mmin n File's data was last modified less than, more than or exactly n minutes ago.
The ${a:-5}
means itβll default to 5 (minutes), but you can choose anything youβd like.
To run, you can just do this:
find_recent_files
To install this to use yourself, you can place it in your shells config file.
- ~/.bashrc
- ~/.zshrc