删除几天前的文件,可以指定文件名的字符
命令:
find /utxt/soft/scmd/log/ -mtime +2 -type f -name '*.log*' -exec rm -f {} \;
远程:
expect -c "
spawn ssh -p22088 -A -q -\oStrictHostKeyChecking=no sms@${1} -t \" find /utxt/soft/scmd/log/ -mtime +2 -type f -name '*.log*' -exec rm -f {} \\\; \"
expect {
\"*assword\" { send \"Eastcom@!@#\r\"; exp_continue;
expect {
\"*assword\" { send \"Eastcom@!@#\r\"; exp_continue;
} }
}
}
"