可以在 ~/.bashrc
文件中加入如下代码:
alias lis='lsof -i -P -n | grep LISTEN | grep '
然后使用 lis
命令即可,例如:
lis 8080
就相当于执行:
lsof -i -P -n | grep LISTEN | grep 8080
可以在 ~/.bashrc
文件中加入如下代码:
alias lis='lsof -i -P -n | grep LISTEN | grep '
然后使用 lis
命令即可,例如:
lis 8080
就相当于执行:
lsof -i -P -n | grep LISTEN | grep 8080