Created
November 16, 2012 09:19
-
-
Save pixie79/4085792 to your computer and use it in GitHub Desktop.
Cron Backup file find script for passing arguments to to_cloud.rb
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/bash | |
# This script is expected to be run once every ten minutes | |
# | |
list="/tmp/backup_list_`date +%s`" | |
find $1 -mmin -800 -type f -print > $list | |
for i in `cat $list` | |
do | |
echo "Backing up: "$i | |
/usr/local/bin/to_cloud.rb $i | |
done | |
rm $list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment