59 lines
2.0 KiB
Plaintext
59 lines
2.0 KiB
Plaintext
# Turn on interactive mode for dangerous commands
|
|
alias cp='cp -iv'
|
|
alias mv='mv -iv'
|
|
alias rm='rm -iv'
|
|
|
|
# File sizes should always be human-readable
|
|
alias df='df -h'
|
|
alias du='du -h'
|
|
|
|
# Greps
|
|
alias egrep='egrep --color=auto' # show differences in colour
|
|
alias fgrep='fgrep --color=auto' # show differences in colour
|
|
alias grep='grep --color' # show differences in colour
|
|
|
|
# File Listing
|
|
alias l='ls -CF' # list with Columns
|
|
alias la='ls -CFA' # l with . and ..
|
|
alias ll='ls -l' # long list
|
|
alias lla='ls -al' # ll with . and ..
|
|
alias ls='ls -hF --color=tty' # classify files in colour
|
|
|
|
# Extras
|
|
alias ping='ping -c 5' # Stop pinging after 5 pings
|
|
alias vi='vim' # use vim instead of vi
|
|
alias less='less -r' # repaint screen
|
|
|
|
# type 'warp' once to set the PWD,
|
|
# CD to other dirs then type 'warp' again to warp back
|
|
alias warp='if [[ "$w" == "" ]]; then w="$(pwd)"; else cd "$w"; unset w; fi'
|
|
|
|
# Misc Shit
|
|
alias LISTEN='netstat -pant | grep LISTEN' # a quicker way to see what services are listening
|
|
alias fuck='sudo $(history -p \!\!)' # runs the last command as sudo
|
|
|
|
# Terminal Pastebin
|
|
alias tb='nc termbin.com 9999'
|
|
|
|
# between head and less
|
|
alias page="head -n $(stty size | awk '{print $1 -2}')"
|
|
|
|
# Terminal Pastebin
|
|
alias pb='nc phaedrus.planethawleywood.com 9999'
|
|
|
|
# Get Ext IP
|
|
alias extip='curl -s -4 icanhazip.com'
|
|
|
|
# Remote Desktop
|
|
alias remadmin='/usr/bin/rdesktop -u "zion\\chawley2" -p -g 1280x750 remadmin.precisiondialogue.com'
|
|
|
|
alias usedips='nmap -v -sn -n 192.168.0.0/24 -oG - | grep Up'
|
|
alias openips='nmap -v -sn -n 192.168.0.0/24 -oG - | grep Down'
|
|
|
|
# webthis - create asimple HTTP server in the current directory serving on port 8000
|
|
alias webthis='python -m SimpleHTTPServer 8000'
|
|
|
|
# For cheating at DCSS (using git)
|
|
alias crawlrestore='git reset --hard && git clean -fd'
|
|
|