Skip to content

Instantly share code, notes, and snippets.

@avambro
Created June 24, 2017 04:35
Show Gist options
  • Save avambro/d3637adbf533831b6be4cca57a372f1a to your computer and use it in GitHub Desktop.
Save avambro/d3637adbf533831b6be4cca57a372f1a to your computer and use it in GitHub Desktop.
find files with interval dates and delete them
touch -d "2016-01-01 00:00:00" /tmp/date.start;
touch -d "2016-12-31 23:59:59" /tmp/date.end;
sudo find ./ -type f -newer /tmp/date.start ! -newer /tmp/date.end -exec rm {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment