Can Anyone help?
I am trying to copy a directory to remote sites, this is how I have done it;
rcp $1/avirus.tgz $SITE:$2/avirus.tgz
Which copies the files across fine, what I want to then do is uncompress the file on the remote site, here is the command Im using;
rcmd $SITE "(/appl/bin/gtar -zxvf /u/shared/a_v/avirus.tgz) && echo '100'"`
if [ "$res1" = "100" ] ; then
rcmd $SITE mv $2/avirus $2/update
if [ $? -eq 0 ] ; then
rcmd $SITE chmod 666 $2/update/*
if [ $? -eq 0 ] ; then
echo "`date`: $0: copied $1/avirus.tgz to $SITE:$2."
Does anyone know of a better way of rcpying dirs to remote sites
I am trying to copy a directory to remote sites, this is how I have done it;
rcp $1/avirus.tgz $SITE:$2/avirus.tgz
Which copies the files across fine, what I want to then do is uncompress the file on the remote site, here is the command Im using;
rcmd $SITE "(/appl/bin/gtar -zxvf /u/shared/a_v/avirus.tgz) && echo '100'"`
if [ "$res1" = "100" ] ; then
rcmd $SITE mv $2/avirus $2/update
if [ $? -eq 0 ] ; then
rcmd $SITE chmod 666 $2/update/*
if [ $? -eq 0 ] ; then
echo "`date`: $0: copied $1/avirus.tgz to $SITE:$2."
Does anyone know of a better way of rcpying dirs to remote sites