weekeight.github.io
weekeight.github.io copied to clipboard
Linux 常用命令(备忘)
- 查看端口占用情况
lsof -i:8080
或netstat -an | grep 8000
- 查看进程
ps aux | grep google
- 查看系统进度占用内存
top -pid xxx
- 查看正在改变的日志文件
tail -f Filename
- 多个文件中查找字符串
grep -rin teststring Filename
- pm2 启动应用时指定 node 解析器
NODE_ENV=prod PORT=3333 pm2 start bin/server.js --name alife --interpreter=./node_modules/.bin/node
- 查看命令绝对路径
which xx