Skip to content

Instantly share code, notes, and snippets.

@zzuhan
Last active October 23, 2020 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzuhan/7745997a09768502a624e1d31d9ccb30 to your computer and use it in GitHub Desktop.
Save zzuhan/7745997a09768502a624e1d31d9ccb30 to your computer and use it in GitHub Desktop.
[bash常用] #bash
ps aux | grep node // 查询node类应用,以及看到pid
lsof -aPi -p $pid // 通过pid查询占用的端口
lsof -i:$port // 通过端口查询pid
sudo ls -hal /root/ | sudo tee /root/test.out > /dev/null
sudo npm ls | sudo tee out.txt > /dev/null
https://zhuanlan.zhihu.com/p/67943584
grep "test" **/*.js
zip -r Demo.zip Demo
unzip Demo.zip -d xxx
du -h -d 1 // 后面数字表示展开的层级
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment