2011-09-29 14:25:05 +02:00
# This file contains aliases which my bashrc uses. You might need to edit something (for example: if you use vi or don't have nmap).
# To get sudo work with aliases.
alias sudo="sudo "
# Moving between directories:
alias ..="cd .."
alias .="cd ."
# Use htop instead of top, it's better. Requires htop.
alias top="htop"
# Automaticly adds title to Youtube-dl when downloading videos with it. Requires youtube-dl.
alias youtube-dl="youtube-dl -t"
# git specific. This is the command which I use when git asks me to commit something and says that I have modified files, even when I haven't.
alias gdrop="git stash && git stash drop"
alias gitk="gitg" # Requires gitg . I just think that it looks nicer than gitk.
# Usually when I run "time", I want to know the current time.
alias time="date"
# If I run nautilus, I want it to open in folder where I am.
alias nautilus="nautilus ./"
# Why I must write "weechat-curses" to start it?
alias weechat="weechat-curses"
2011-10-26 12:54:37 +02:00
#NMAP specific. All nmap things should be run as root, so it's probably best to copy these aliases to root's .zshrc. Things which don't run without root ask for sudo password.
2011-09-29 14:25:05 +02:00
alias nmap-intense="nmap -T4 -A -v -PE -PS22,25,80 -PA21,23,80,3389 "
alias nmap-intense-udp="sudo nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,3389 "
alias nmap-intense-all-tcp="nmap -p 1-65535 -T4 -A -v -PE -PS22,25,80 -PA21,23,80,3389 "
alias nmap-intense-no-ping="nmap -T4 -A -v -PN "
alias nmap-ping="nmap -sP -PE -PA21,23,80,3389 "
alias nmap-quick="nmap -T4 -F "
alias nmap-quick-plus="sudo nmap -sV -T4 -O -F --version-light "
alias nmap-traceroute="sudo nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute "
alias nmap-regular="nmap "
alias nmap-comprehensive="sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all "
2011-10-26 14:12:58 +02:00
# Little "safer" scan as connecting to only HTTP and HTTPS ports doesn't look so attacking. Copy-paste to .zsh_custom and remove " -p 80,443" if you want to scan all ports which nmap scans by default.
alias nmap-osscan="sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy "
2011-09-29 14:25:05 +02:00
alias ping="nping "
2011-10-06 18:18:34 +02:00
alias ping6="nping -6"
2011-09-29 14:25:05 +02:00
alias netcat="ncat "
# TOR (The Onion Router) specific.
alias usewithtor="proxychains "
alias torsocks="proxychains "
2011-10-02 16:13:59 +02:00
# This should allow aliases to work with proxychains.
alias proxychains="proxychains "
2011-09-29 14:25:05 +02:00
# Downloads folder over SSH. Usage: rdownload <host>:<remotefolder> <local_destination> | TIP: use ~/ssh/config to configure hosts.
alias rdownload="rsync -avz "
# TMUX specific
2011-10-17 13:29:08 +02:00
alias attach="exec tmux -u attach-session"
2011-09-29 14:25:05 +02:00
alias detach="tmux -u detach"
2011-10-17 13:29:08 +02:00
alias tmux="exec tmux -u"
2011-09-29 14:25:05 +02:00
# I am always typoing "aptitude" with my phone...
alias aptitute="aptitude "
# This is the checkinstall rule which I like to use.
alias checkinstall="make install "
# The Battle for Wesnoth specific, http://wesnoth.org/
# It seems to be an good idea to have debug logs on terminal with svn version.
alias wesnoth="wesnoth --debug"
2011-09-29 15:08:14 +02:00
# Auto extension things, ( modified from https://wiki.archlinux.org/index.php/Zsh#Advanced_.zshrc_files )
alias -s html=$BROWSER
alias -s org=$BROWSER
alias -s php=$BROWSER
alias -s com=$BROWSER
alias -s net=$BROWSER
alias -s png="eog"
alias -s jpg="eog"
alias -s gif="eog"
alias -s sxw="libreoffice --writer"
alias -s doc="libreoffice --writer"
alias -s gz='tar -xzvf'
alias -s bz2='tar -xjvf'
#alias -s java=$EDITOR
2011-09-29 15:19:15 +02:00
#alias -s txt=$EDITOR
#alias -s PKGBUILD=$EDITOR
2011-09-29 15:08:14 +02:00
2011-09-29 15:19:15 +02:00
# For copy-pasting directly from somewhere
2011-09-29 17:26:14 +02:00
alias %=" "
# SupyBot specifig. Why to write long command, if you can write short command?
2011-09-29 17:36:36 +02:00
alias supybot-config-reload="killall -HUP supybot "
2011-09-30 13:32:04 +02:00
alias supybot-owner-quit="killall -INT supybot "
2011-10-26 20:11:27 +02:00
# Translating plugins in Limnoria
2011-10-26 20:14:22 +02:00
alias supybot-generate-messages.pot="pygettext − − docstring config.py plugin.py"
2011-09-29 17:36:36 +02:00
# ZSH specific.
# I think that "theme" is more describing than "prompt".
alias theme="prompt "
2011-10-02 16:02:04 +02:00
# Hard way teached me to
2011-10-02 16:42:39 +02:00
alias vipw="\vipw && \vipw -s && \vipw -g && \visudo"
alias visudo="\visudo && \vipw && \vipw -g && \vipw -s"
alias vigr="\vigr && \vigr -s && \vigr -p && \visudo"
2011-10-02 18:52:12 +02:00
## -- Start of aliases which are saved from Ubuntu default bashrc. --
# enable color support of ls and also add handy aliases
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
## -- End of aliases which are saved from Ubuntu default bashrc. --
2011-10-16 22:59:02 +02:00
# Copying command in Supybot (Internet.DNS)
alias dns="nslookup "
2011-10-17 13:25:42 +02:00
alias dns6="nslookup -type=AAAA "
alias nslookup6="nslookup -type=AAAA "
2011-10-18 18:23:24 +02:00
# If I have nslookup6...
alias dig6="dig AAAA "
2011-10-28 19:05:40 +02:00
# SSHGuard specific
alias sshguard-show-bans="sudo iptables -L sshguard --line-numbers"
# Enter ban number as arguement. You can see ban numbers with previous command.
alias sshguard-unban="sudo iptables -D sshguard "