Last active
September 18, 2023 17:17
-
-
Save Sunny-unik/5fd9bcfd8b4156e0c400f86f453dd1f4 to your computer and use it in GitHub Desktop.
Bash utility functions & aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# self made functions | |
killPortFunction() { | |
if [ -z "$1" ]; then | |
echo "Usage: killPort <port>" | |
return 1 | |
fi | |
echo "Killing process on port $1" | |
sudo kill -9 $(sudo lsof -t -i:$1) | |
} | |
# some more aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias h-search='history | grep $p' | |
alias n-watch='npm run watch' | |
alias n-dev='npm run dev' | |
alias kill-port='killPortFunction' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment