Skip to content

Instantly share code, notes, and snippets.

@pv8
Last active December 27, 2015 16:09
Show Gist options
  • Save pv8/7353184 to your computer and use it in GitHub Desktop.
Save pv8/7353184 to your computer and use it in GitHub Desktop.
Handy script to remove older files from specific directories
#!/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