Thanks to the many, many who replied so promptly :
The answer that most people suggested was: rdist
I had been using rdist before but never realised how flexible it could be.
I neglected
to mention that I wanted to copy to a remote directory of a different name
AND wanted to
exclude certain subdirectories from copying. I didn't realise this was
easily achievable with
rdist. So thanks to all those who enlightened me.
Here's the rdist file I'm now using :
HOSTS = ( fnx4000 )
EXCEPT = (
/appl/fnx/yest_report/EntryLogs
/appl/fnx/yest_report/batch
/appl/fnx/yest_report/bin
/appl/fnx/yest_report/dat
/appl/fnx/yest_report/install_log
/appl/fnx/yest_report/lib
/appl/fnx/yest_report/lost+found
/appl/fnx/yest_report/tpl
/appl/fnx/yest_report/users
/appl/fnx/yest_report/wss
/appl/fnx/yest_report/ERRORLOG.TX)
FILES = (
/appl/fnx/yest_report
)
${FILES} -> ${HOSTS}
install -y /appl/fnx/prod ;
except ${EXCEPT}
Some of you suggested checking out rsync
http://samba.anu.edu.au/rsync/
which I will do at some point.
Some even suggested tar/gtar, which didn't look as clean as rdist.
Thanks again.
My Original Question :
Hi,
I need to rcp or tar report files from local host to a remote host to
which I have rsh access.
Problem is :
There could be files of identical names on the remote machine. Before I
copy I need to check
the remote machine for the identical filename to see if it is newer
(therefore more up to date) and thus
not copy that particular file if it is.
I could NFS mount (ro) the remote filesystem and use a ksh [ $file1 -nt
$file2 ] test, but NFS is not as standard
running on both these machines and would be my last resort to start it/stop
it as part of these copies.
As anyone got any idea how I might achieve this ?
Bill Walker
Service Level 2 Unix Support Group
Cutlers Exchange London
Deutsche Morgan Grenfell UK Ltd
Tel:0171 545 8508
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:35 CDT