Skip to content

Instantly share code, notes, and snippets.

@ClementGautier
Created February 3, 2012 09:34
Show Gist options
  • Save ClementGautier/1729372 to your computer and use it in GitHub Desktop.
Save ClementGautier/1729372 to your computer and use it in GitHub Desktop.
My Bash Aliases
alias ls="ls --color"
alias ll="ls -lh"
alias df="df -h"
alias grep='grep --color=auto'
alias grep='grep --exclude-dir ".svn" --exclude tags'
alias untar="tar xvf"
alias ungz="gunzip"
alias unzip2="bzip2 -d"
alias untargz="tar zxvf"
alias untarbz1="tar jxvf"
alias ungz2="bunzip2 -k"
alias ackk='ack-grep'
alias svnste="svn st --ignore-externals | grep -v '^X' | cut -d: -f2"
alias svnsti="svn st --ignore-externals | grep \"^? \""
alias svnst="echo \"Staged :\" && echo \"-\" && svnste && echo && echo \"Unstaged :\" && echo \"--\" && svnsti"
#for projects :
alias kill_queue="ps -A | grep queue | awk '{print \$1}' | xargs kill 2>/dev/null"
alias start_queue="nohup data/bin/run_queue.sh dev > /dev/null &"
extract () {
if [ -f $1 ] ; then
case $1 in
*.7z) 7z x $1 ;;
*.bz2) bunzip2 $1 ;;
*.gz) gunzip $1 ;;
*.rar) rar x $1 ;;
*.tar) tar xvf $1 ;;
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.Z) uncompress $1 ;;
*.zip) unzip $1 ;;
*) echo "Le format de compression de '$1' n'est pas supporté..." ;; esac
else
echo "'$1' n'est pas un fichier !"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment