Skip to content

Instantly share code, notes, and snippets.

@jjpmann
Created January 12, 2018 21:03
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 jjpmann/8d446ae5c61456e658fec2c189323d5a to your computer and use it in GitHub Desktop.
Save jjpmann/8d446ae5c61456e658fec2c189323d5a to your computer and use it in GitHub Desktop.
server-alisas.sh
############################################################
# (custom) shortcuts
############################################################
# List directory with all files
alias l='clear; echo ""; echo -------------- `pwd`; echo ""; ls -lah; echo ""';
# List users on the system
alias users='cat /etc/passwd | cut -d ":" -f1'
# Show IP address
alias myip="echo INTERNAL && ifconfig | grep 'inet ' && echo PUBLIC && echo ' ' `dig +short myip.opendns.com @resolver1.opendns.com`"
# Show Current process of user
alias psg='ps aux | head -n 1; ps aux | grep -v grep | grep -i'
# Show file size of files & directories
alias fs='clear; echo ""; echo -------------- `pwd`; echo ""; du -sch .[!.]* * |sort -h; echo ""';
# grep history alias
alias hg='history | grep ';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment