linux 常用命令

chmod-R755wenjian

rm-rf文件名强行删除ls-a查看隐藏文件

kill-9pid

ps-ef|grepjava

cdcd..返回上一级cd/data/tomcat-8080./

mkdir

copy

bin/startup.sh

tail-flogs/catalina.out

#!/usr/bin/expect

settimeout30

spawnscp-r/data/tomcat-8081/ROOT/root@ip:/data/tomcat-80/

expect{

"yes/no"{send"yes\r";exp_continue}

"password:"{send"WWW123c0m\r"}

}

interact

#!/usr/bin/expect

settimeout30

spawnssh-lrootip

expect"password:"

send"WWW123c0m\r"

expect"*#"

send"cd/data/tomcat-8081/\r"

expect"*#"

send"bin/shutdown.sh\r"

expect"*#"

send"bin/startup.sh&tail-flogs/catalina.out\r"

interact

相关推荐