Created
February 21, 2017 21:38
-
-
Save mrmoje/9573f0dd3112883ead65968aedc2c14e to your computer and use it in GitHub Desktop.
nuke directories by date threshold
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#credit:- http://stackoverflow.com/questions/33091013/delete-files-older-than-specific-date-in-linux | |
#example:- nuke all files created before jan 1 2017, | |
touch -t 201701010000 /tmp/2017-Jan-01-0000 | |
find `pwd` -maxdepth 1 -type d ! -newer /tmp/2017-Jan-01-0000 -exec rm -rf "{}" \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment