I am trying to write a script to ftp all files/directories changed in a 24hour period to another AIX server. I have wrote a script to generate a list of all files changed within a 24 hour period but dont know how to then ftp these to another server. How do incorporate ftp into this script?
#!/bin/ksh
PROG=`basename $0`
DATE=`date '+%d-%m-%y:%T'`
LOG=/var/logs/$PROG.$DATE
exec > $LOG 2>&1
/usr/bin/logger -p user.info "[$PROG on `hostname`] starting"
# Find all files changed within the last 24hours excluding /proc
find / -name proc -prune -o -ctime 1 -ls > $LOG
/usr/bin/logger -p user.info "[$PROG on `hostname`] completed successfully"
exit 0