Created
February 7, 2013 23:06
-
-
Save grafikchaos/4735051 to your computer and use it in GitHub Desktop.
oh-my-zsh aliases plugin for common aliases I use
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
# ~/.oh-my-zsh/custom/aliases.zsh | |
# At the end of the file you can add the aliases from above | |
# or any other ones you find useful | |
alias ..='cd ..' | |
alias ll='ls -alGhF' | |
alias install='sudo apt-get install' | |
alias upgrade='sudo apt-get upgrade' | |
alias update='sudo apt-get update' | |
alias search='sudo apt-cache search -n' | |
# Grep Processes | |
function psx() { | |
ps auxw | grep --color=always $1 | grep -v 'grep'; | |
} | |
# Apache2 | |
alias apache='sudo /etc/init.d/apache2' | |
alias apache.status='apache status' | |
alias apache.stop='apache stop' | |
alias apache.start='apache start' | |
alias apache.restart='apache restart' | |
alias apache.graceful='apache graceful' | |
alias apache.edit='sudo vi /etc/apache2/httpd.conf' | |
# Nginx | |
# Usage: nginx {start|stop|restart|reload|force-reload|status|configtest} | |
alias nginx='sudo /etc/init.d/nginx' | |
alias nginx.status='nginx status' | |
alias nginx.configtest='nginx configtest' | |
alias nginx.stop='nginx stop' | |
alias nginx.start='nginx start' | |
alias nginx.restart='nginx.configtest && nginx restart' | |
alias nginx.reload='nginx reload' | |
alias nginx.reload!='nginx force-reload' | |
alias nginx.reboot='nginx.restart && phpfpm.restart' | |
alias nginx.edit='sudo vi /etc/nginx/nginx.conf' | |
# PHP5-FPM | |
# Usage: /etc/init.d/php5-fpm {start|stop|status|restart|reload|force-reload} | |
alias phpfpm='sudo /etc/init.d/php5-fpm' | |
alias phpfpm.status='phpfpm status' | |
alias phpfpm.start='phpfpm start' | |
alias phpfpm.stop='phpfpm stop' | |
alias phpfpm.restart='phpfpm restart' | |
alias phpfpm.reload='phpfpm reload' | |
alias phpfpm.reload!='phpfpm force-reload' | |
alias phpfpm.reboot='nginx.restart && phpfpm.restart' | |
# fix dir/file permissions recursively from the current directory | |
alias fixpermd='find . -type d -exec chmod 755 {} \;' | |
alias fixpermf='find . -type f -exec chmod 644 {} \;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment