Last active
December 27, 2015 16:09
-
-
Save pv8/7353184 to your computer and use it in GitHub Desktop.
Handy script to remove older files from specific directories
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
#!/bin/sh | |
# delete files from $1 directory older than $2 days | |
echo Removing files in $1 older than $2 days... | |
find $1 -mtime +$2 -type f -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment