Skip to content

Instantly share code, notes, and snippets.

@chinboon
Created December 18, 2017 10:23
Show Gist options
  • Select an option

  • Save chinboon/0e47cc3c122073e7604a55df09ffe238 to your computer and use it in GitHub Desktop.

Select an option

Save chinboon/0e47cc3c122073e7604a55df09ffe238 to your computer and use it in GitHub Desktop.
find-files-modified-x-minutes-ago.sh
# MAC
# +30 is older than 30 day, -30 would be modified in last 30 days.
# mtime n modified time (n* 24 hours)
# atime n accessed time (n* 24 hours)
# mmin n modified time (n * 1 min)
# find all files modified since 2 hours ago
find . -type f -mtime -2 -exec ls -l {} \;
# find all files modified since 30 minutes ago
find . -type f -ctime -30s -exec ls -l {} \;
# Linux
# find all files modified since 30 mins ago
find . -type f -mmin -30 -exec ls -l {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment