shell命令集合

MAVEN


查看MAVEN项目依赖树


1
mvn dependency:tree



Spring


远程调试

1
ssh -p 1046 -L 端口号:localhost:端口号 用户@远程IP



服务器


免输密码登录服务器

1
2
3
4
5
#!/usr/bin/expect
spawn ssh 用户@远程主机IP
expect "password:"
send "密码\r"
interact

办公网络传输文件至本地服务器

1
2
3
4
5
6
#!/usr/bin/expect
set file [lindex $argv 0]
spawn scp -r $file 用户@本地服务器IP:/tmp
expect "password: "
send "用户密码\r"
expect eof

文件查找

1
find 路径 -iname "*.txt"

查找包含某内容的文件

1
grep -rn --include="*.java" 查找内容 路径





文章目录
  1. 1. MAVEN
    1. 1.1. 查看MAVEN项目依赖树
  2. 2. Spring
    1. 2.1. 远程调试
  3. 3. 服务器
    1. 3.1. 免输密码登录服务器
    2. 3.2. 办公网络传输文件至本地服务器
    3. 3.3. 文件查找
    4. 3.4. 查找包含某内容的文件