Skip to content

Instantly share code, notes, and snippets.

@pixie79
Created November 16, 2012 09:19
Show Gist options
  • Save pixie79/4085792 to your computer and use it in GitHub Desktop.
Save pixie79/4085792 to your computer and use it in GitHub Desktop.
Cron Backup file find script for passing arguments to to_cloud.rb
#!/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