简单LINUX之间文件拷贝及解压
#!/bin/sh
echo "strat copy"
username="manager"
localpath=/home/root
sysdate=`date "+%Y%m%d"`
remoteip=172.19.2.75
remotepath=/home/manager/$sysdate.tar.gz
scp $username@$remoteip:$remotepath $localpath
echo "success copy"
echo "start tar the file "
cd $localpath
tar -xcvf $sysdate.tar.gz && echo "success tar the file"
echo end of tar the file "