The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copying files from a remote server to local system with cygwin patwa UNIX for Dummies Questions & Answers 3 06-12-2008 04:49 AM
Getting remote data through shell script armohans Shell Programming and Scripting 1 04-15-2008 05:07 PM
File System - Remote or Local?? Un1xNewb1e UNIX for Dummies Questions & Answers 1 04-11-2008 01:23 PM
how to mount a file system of a remote machine to local file system cy163 UNIX for Dummies Questions & Answers 2 01-31-2008 06:04 AM
transfer data to a remote system from the tape jack123 SUN Solaris 1 06-27-2006 12:43 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 01-31-2008
ynilesh's Avatar
Registered User
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 174
how to verify that copied data to remote system is identical with local data.

I have created simple shell script
#!/bin/sh

echo `date`; echo "Start ....
find . -mtime +95 -print > /tmp/files.txt

for file in `cat /tmp/files.txt`
do
echo "copying file - $file"
/usr/local/bin/scp -p -P 2222 $file remote.hostname:/file/path
echo "copid file - $file"
done
echo "End .... "

How to verify that i have copied data successfully to remote system.

Thanks
Nilesh
Reply With Quote
Forum Sponsor
  #2  
Old 01-31-2008
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 790
after you issue scp, check what does $? tell you
Reply With Quote
  #3  
Old 01-31-2008
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Run a checksum or md5sum on the local files and then run the same on the remote copied files. If the two match, the files are ok.
Reply With Quote
  #4  
Old 01-31-2008
ynilesh's Avatar
Registered User
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 174
Is there any other way to verify expect md5sum ?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
scp

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0