alias weather='curl -4 http://wttr.in/Novorossiysk' # NETWORK alias ip='ip -4 -c' alias ping='ping -4 -c 4' # Do not wait interval 1 second, go fast # alias fastping='ping -c 100 -s 2' alias ports='netstat -tulanp' # FILES alias ls='ls -h --group-directories-first --color=auto' alias ll='ls -lah --group-directories-first --color=auto' alias l.='ls -dh .* --color=auto' alias cd..='cd ..' alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" # SEARCH alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias nocomment='grep -Ev '"'^(#|$)'"'' alias bc='bc -l' alias mkdir='mkdir -pv' alias c='clear;echo -e "\n\n\n"' alias h='history' alias j='jobs -l' alias path='echo -e ${PATH//:/\\n}' alias now='date +"%T"' alias nowtime=now alias nowdate='date +"%d-%m-%Y"' alias vi=vim alias svi='sudo vi' alias vis='vim "+set si"' alias edit='vim' alias bashrc="vim ~/.bashrc && source ~/.bashrc" #Last opened file in vim alias lvim='vim -c "normal '\''0"' # confirmation # alias mv='mv -i' alias cp='cp -i' alias ln='ln -i' alias apt-get="sudo apt-get" alias updatey="sudo apt-get --yes" # update on one command alias update='sudo apt-get update && sudo apt-get upgrade' alias root='sudo -i' alias su='sudo -i' alias reboot='sudo /sbin/reboot' alias poweroff='sudo /sbin/poweroff' alias halt='sudo /sbin/halt' alias shutdown='sudo /sbin/shutdown' alias wget='wget -c' ## set some other defaults ## alias df='df -H' alias du='du -ch' #not delete / or prompt if deleting more than 3 files at a time # # Parenting changing perms on / # alias chown='chown --preserve-root' alias chmod='chmod --preserve-root' alias chgrp='chgrp --preserve-root' alias rm='rm -I --preserve-root' alias mount='mount |column -t' # shortcut for iptables and pass it via sudo alias ipt='sudo /sbin/iptables' # display all rules alias iptlist='sudo /sbin/iptables -L -n -v --line-numbers' alias iptlistin='sudo /sbin/iptables -L INPUT -n -v --line-numbers' alias iptlistout='sudo /sbin/iptables -L OUTPUT -n -v --line-numbers' alias iptlistfw='sudo /sbin/iptables -L FORWARD -n -v --line-numbers' alias firewall=iptlist alias untar='tar -zxvf' # also pass it via sudo so whoever is admin can reload it without calling you alias nginxreload='sudo /usr/local/nginx/sbin/nginx -s reload' alias nginxtest='sudo /usr/local/nginx/sbin/nginx -t' alias lightyload='sudo /etc/init.d/lighttpd reload' alias lightytest='sudo /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -t' alias httpdreload='sudo /usr/sbin/apachectl -k graceful' alias httpdtest='sudo /usr/sbin/apachectl -t && /usr/sbin/apachectl -t -D DUMP_VHOSTS' #Grabs the disk usage in the current directory alias usage='du -ch | grep total' #Gets the total disk usage on your machine alias totalusage='df -hl --total | grep total' #Shows the individual partition usages without the temporary memory values alias partusage='df -hlT --exclude-type=tmpfs --exclude-type=devtmpfs' #Gives you what is using the most space. Both directories and files. Varies on #current directory alias most='du -hsx * | sort -rh | head -10' # GIT alias g='git' alias gr='git rm -rf' alias gs='git status' alias ga='g add' alias gc='git commit -m' alias gp='git push origin master' alias gl='git pull origin master'