Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created September 5, 2019 16:30
Show Gist options
  • Save meysampg/6dca555004979ede904bc596652c2e38 to your computer and use it in GitHub Desktop.
Save meysampg/6dca555004979ede904bc596652c2e38 to your computer and use it in GitHub Desktop.
Find all files which accessed between now and 50 minutes ago
SEARCH_DIR="/path/to/directory"
FORMAT="%Y-%m-%d %H:00:00"
find $SEARCH_DIR -newerat "`date -d "-50minutes" +"$FORMAT"`" ! -newerat "`date +"$FORMAT"`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment