pid_for function has been added to find the process responsible for a port

This commit is contained in:
Sameer Rahmani 2018-01-23 11:19:27 +00:00
parent f432800e97
commit 3b79969fa4
2 changed files with 8 additions and 17 deletions

8
lib/utils.zsh Normal file
View File

@ -0,0 +1,8 @@
pid_for() {
echo $(ss -lptn "sport = :$1")
echo "---------\n"
echo $(netstat -nlp | grep ":$1")
echo "---------\n"
echo $(lsof -n -i ":$1" | grep LISTEN)
}

View File

@ -1,17 +0,0 @@
# Path to your oh-my-zsh configuration.
#ZSH=$HOME/src/oh-my-zsh
MYZSH=$HOME/src/My.Zsh
THEME=$MYZSH/themes/lxsameer.zsh-theme
# Example aliases
alias emacsw="emacs -nw"
source $MYZSH/my.zsh
PROJECTS=$HOME/src/
eval $(keychain --eval --agents ssh -Q --quiet id_rsa)
export PATH=/home/lxsameer/.gem/ruby/2.0.0/bin:$PATH
export GEM_HOME=~/.gem/