The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 07:49 AM
Getting remote data through shell script armohans Shell Programming and Scripting 1 04-15-2008 08:07 PM
File System - Remote or Local?? Un1xNewb1e UNIX for Dummies Questions & Answers 1 04-11-2008 04: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 09:04 AM
transfer data to a remote system from the tape jack123 SUN Solaris 1 06-27-2006 03:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-31-2008
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
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
  #2 (permalink)  
Old 01-31-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
after you issue scp, check what does $? tell you
  #3 (permalink)  
Old 01-31-2008
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
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.
  #4 (permalink)  
Old 01-31-2008
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
Is there any other way to verify expect md5sum ?
Sponsored Links
Closed Thread

Bookmarks

Tags
scp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0