This is the short script I have so far
#!/usr/bin/sh
for i in 01 02 03 04 05
do
ssh test@hostname-$i "cd /var/log; find /var/log -mtime +1 -exec scp storage_server"
done
Hi All,
I am new to unix shell scripting. I want to write a script that can move my log files daily from my servers about 5 of them to a storage server. The script should move only today's log files from a log dir to the storage server. I want the script to run as a cron job from one main...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.