删除几天前的文件,可以指定文件名保护的字符
作者:互联网
命令:
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;
} }
}
}
"
标签:字符,assword,log,删除,文件名,scmd,send,expect,mtime 来源: https://www.cnblogs.com/xincha/p/15508179.html