Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email if copy is complete

Status
Not open for further replies.

jie

Technical User
Apr 8, 2003
71
0
0
US
Hi I have a cron job every afternoon cp -Rp /opt/loc/bin/test/* /opt/loc/bin/prd/. is it possible that it emails me after the copy is over. am new to scripting thanks in advance.
 
man sendmail

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PHV yes I know a little about sendmail but am thinking of script to check if the process of copying is complete and then email me that the copy is finished ..thanks
 
Something like this ?
cp -Rp /opt/loc/bin/test/* /opt/loc/bin/prd/. && echo "OK" | mail -s "Copy completed" yourname@yourdomain

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top