Skip to content

Instantly share code, notes, and snippets.

@giri-v
giri-v / cleanoldfilesdaily.sh
Created June 3, 2020 21:01
Automated "delete files older than" bash script
#!/bin/sh
echo "Starting cleaning old files..."
find [Path to search] -mtime +10 -type f -delete
echo "Finished cleaning old files..."
(sleep 1d;/bin/sh [Path to this file]/cleanoldfilesdaily.sh)