Skip to content

Instantly share code, notes, and snippets.

@muhammaddadu
Created September 19, 2018 20:25
Show Gist options
  • Save muhammaddadu/4a40ce5c5e479bd6ad056e7ad37eef12 to your computer and use it in GitHub Desktop.
Save muhammaddadu/4a40ce5c5e479bd6ad056e7ad37eef12 to your computer and use it in GitHub Desktop.
Some bash shortcuts
##
# 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