Skip to content

Instantly share code, notes, and snippets.

@cedricwalter
Created April 24, 2012 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cedricwalter/2478466 to your computer and use it in GitHub Desktop.
Save cedricwalter/2478466 to your computer and use it in GitHub Desktop.
Use profile for linux webserver
alias ..='cd ..'
alias ...='cd ../..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ..='cd ..'
alias ..2='cd ../..'
alias ..3='cd ../../..'
alias ..4='cd ../../../..'
alias memcachestatus='watch "echo stats | nc 127.0.0.1 11211"'
alias backupNow='sh /root/doBackup.sh'
alias aplogs='tail -f /var/log/apache2/error_log'
alias beep='echo -en "\007"'
alias cd..='cd ..'
alias cpufreq='cpufreq-info'
alias dir='ls -l'
alias fixOwner='chown -R www-data .;chgrp -R www-data .'
alias fixpermD='find . -type d -exec chmod 755 {} \;'
alias fixpermF='find . -type f -exec chmod 644 {} \;'
alias fixperms='fixpermF;fixpermD;fixOwner'
alias rn='service nginx reload'
alias rr='service nginx restart'
alias php5reload='service nginx reload'
alias php5restart='service nginx restart'
alias gotoftp='ncftp -u b088783 backup.serverkompetenz.de'
alias l='ls -alF'
alias la='ls -la'
alias listOpenConnections='lsof -i -n | egrep \'COMMAND|LISTEN|UDP\''
# list of network ports that are open
alias openports1='netstat -tulp'
alias openports2='netstat -nape --inet'
alias diskspace="du -S | sort -n -r |more"
# Show me the size (sorted) of only the folders in this directory
alias folders="find . -maxdepth 1 -type d -print | xargs du -sk | sort -rn"
alias ll='ls -l'
alias logn='tail -f /var/log/nginx/error.log'
alias logt='tail -f /home/tomcat/tomcat/logs/catalina.out'
alias logm='tail -f /var/log/mysql/mysql-slow.log'
alias lowercaseallfiles='for f in *; do mv $f `echo $f | tr [:upper:] [:lower:]`; done'
alias ls='ls $LS_OPTIONS'
alias ls-l='ls -l'
alias md='mkdir -p'
alias o='less'
alias privatec='cd /var/www/vhosts/waltercedric.com/private'
alias rd='rmdir'
alias readonlyPerms='find . -type f -exec chmod 444 {} \; ; find . -type d -exec chmod 555 {} \;'
alias rehash='hash -r'
alias relc='cd /var/www/vhosts/waltercedric.com/httpdocs '
alias relr='cd /var/www/vhosts/vanhaarlem.ch/httpdocs'
alias rt='/etc/init.d/tomcat restart'
alias setcpu='cpufreq-set -c 0 -d 2GHz'
alias speed='ethtool eth0'
alias dos2unixr='find . -name *.* -exec dis2unix {} \;'
alias h=i'history'
alias hm='history | more'
alias ff='find . -type f -name'
alias fw_list='.clear && iptables .line-numbers -L -nv.'
alias fw_save='.iptables-save > /etc/iptables.rules.'
alias fw_restore='.iptables-restore < /etc/iptables.rules.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment