Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Search Forums:



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

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-08-2012
Registered User
 

Join Date: May 2011
Posts: 35
Thanks: 5
Thanked 0 Times in 0 Posts
Check files copied from remote server

There is a process which copy files form unix a to unix b
I would like to check whether all files copied from a to b or not ,and list which are the missing files.
Is there a command to check like that
Sponsored Links
    #2  
Old 02-08-2012
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 8,506
Thanks: 67
Thanked 401 Times in 390 Posts
You can do it several ways


Code:
ftp -n <<EOF > check.dat
open remotenode
USER username
PASS passwd
cd /remotedir
ls
bye
EOF

if you have ssh keys installed

Code:
ssh remotenode 'ls -l /path/to/remotefiles'

Sponsored Links
    #3  
Old 02-08-2012
Registered User
 

Join Date: May 2011
Posts: 35
Thanks: 5
Thanked 0 Times in 0 Posts
Actually i need to check this is shell script , not manually

Last edited by lalitpct; 02-08-2012 at 11:28 PM.. Reason: spell mistake
    #4  
Old 02-09-2012
Registered User
 

Join Date: Feb 2012
Location: India
Posts: 102
Thanks: 9
Thanked 2 Times in 2 Posts
1> Assume both files reside on remote m/c

# ssh user@192.168.8.20 diff -rq dir1 dir2

2> You can use rsync too
rsync -avn src-dir/ tar-dir/

3>Lsit colliding filenames
diff -sq dir1 dir2 | grep -v "Only in"

--Shirish
Sponsored Links
Reply

Tags
check files copied from remote server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
preserving the timestamp of a file when copied from remote server to local server using ftp arunkumarmc Shell Programming and Scripting 5 05-14-2010 05:18 AM
Check copied file beginningDBA Solaris 7 11-25-2009 04:56 AM
How to check whether file is exist on remote server suigion Shell Programming and Scripting 3 07-14-2009 02:00 AM
How to check file is being copied anhkeen Shell Programming and Scripting 2 06-06-2008 02:27 AM
How to check the file status in a remote server? rajus19 Shell Programming and Scripting 3 04-28-2006 04:45 AM



All times are GMT -4. The time now is 04:48 AM.