Created
September 19, 2018 20:25
-
-
Save muhammaddadu/4a40ce5c5e479bd6ad056e7ad37eef12 to your computer and use it in GitHub Desktop.
Some bash shortcuts
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
## | |
# Shorthand Stuff | |
## | |
alias qfind="find . -name " | |
alias pg='ps aux | grep' #requires an argument | |
alias openports='netstat -nape --inet' | |
alias ll="ls -l" | |
alias show_hidden="defaults write com.apple.finder AppleShowAllFiles YES" | |
alias hide_hidden="defaults write com.apple.finder AppleShowAllFiles NO" | |
alias firefox='open -a firefox' | |
trash () { command mv "$@" ~/.Trash ; } # trash: Moves a file to the MacOS trash | |
show () { qlmanage -p "$*" >& /dev/null; } # ql: Opens any file in MacOS Quicklook Preview | |
scannetwork () { | |
# Ping the broadcast address | |
# (you can find it with ifconfig | grep broadcast) | |
ifconfig | grep broadcast; | |
arp -a | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment