I need to cp some files from my Sun box to a W2K server on a routine basis.
What would the best approach be to do this.
Cron?FTP from the W2K on a schedule?
Any tips or cautions?
Look into SAMBA. This makes your Sun machine look like an NT server to your Windows machine. This means you could even leave the file on the Sun and have it on a SAMBA share that your W2K machine accesses as if was another W2K machine. You could use a [tt]copy[/tt] command on the W2K machine to bring the file over.
Here's a script I use to send files to a remote PC
integer N_FILES_COPIED
integer N_FILES_TOSEND
RETRY_INTERVAL=30
SCRIPT=ftp.script
COPY_SCRIPT=copy.script
IP_ADDR=100.100.10.100
RUSER=anonymous
RPASS=passwd
echo "machine ${IP_ADDR}
login ${RUSER}
password ${RPASS}
" > ${HOME}/.netrc
chmod 600 ${HOME}/.netrc
if [ -r /home//ran.today ]
then
true
else
echo " TX HAS NOT RUN - OR HAS ALREADY BEEN COPIED (`date`)" >> ${_COPY_LOG}
echo "${0} ${*}" | at now + ${RETRY_INTERVAL} minutes
exit 99
fi
if ping -c1 -i2 ${ADDR} >/dev/null 2>&1
then
true
else
echo "NO RESPONSE FROM ${ADDR} @ `date`" >> ${_COPY_LOG}
echo "${0} ${*}" | at now + ${RETRY_INTERVAL} minutes
exit 99
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.