Created
February 23, 2017 09:08
-
-
Save davsclaus/25a01789bb4612af676da0895c6b18ab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
M2_REPO=${HOME}/.m2 | |
OLDFILES=/tmp/oldfiles.txt | |
AGE=31 | |
find "${M2_REPO}" -name '*jar' -atime +${AGE} -exec dirname {} \; >> ${OLDFILES} | |
find "${M2_REPO}" -name '*war' -atime +${AGE} -exec dirname {} \; >> ${OLDFILES} | |
for x in `cat ${OLDFILES}`; do rm -rf "$x"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment