#### Completion auto #### if [ "$PS1" -a -f /etc/bash_completion ]; then . /etc/bash_completion fi #### Prompt ameliore #### PS1="[\u \w] " #### Path supplementaire #### export PATH=$PATH:.:$HOME/Scripts #### Variable vers les libs de prog #### export LD_LIBRARY_PATH=/home/houlala/Master/lib #### Variable pour la navigation #### export CDPATH=".:/home/houlala" #### Alias #### alias grep='grep --color=always' alias ll='ls -Fl --color=auto --human-readable' alias la='ls -Fla --color=auto --human-readable' alias ls='ls -Fl --color=auto' alias lsd='ll | grep "^d"' alias lss='ll -Sr' alias df='df -Th' alias du='du -h' alias mod700='chmod 700' alias mod701='chmod 701' alias mod705='chmod 705' alias mod755='chmod 755' alias agu='sudo apt-get update' alias agg='sudo apt-get upgrade' alias agd='sudo apt-get dist-upgrade' alias agi='sudo apt-get install' alias agr='sudo apt-get autoremove' alias ags='apt-cache search' alias tx='tar xvf' alias txz='tar zxvf' alias tbz='tar cvjf' alias tcz='tar cvzf' alias zx='unzip' alias rx='unrar x' alias webup='sudo /etc/init.d/apache2 start && sudo /etc/init.d/mysql start' alias webdown='sudo /etc/init.d/apache2 stop && sudo /etc/init.d/mysql stop' #### Fonctions #### mkpro() { mkdir -p "$1"/bin "$1"/build "$1"/doc "$1"/include "$1"/lib "$1"/src; touch "$1"/build/Makefile; } extract() { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjvf $1 ;; *.tar.gz) tar xzvf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *) echo "'$1' impossible d'extraire avec 'extract'" ;; esac else echo "'$1' est un fichier invalide" fi } #### Fonctions #### mkpro() { mkdir -p "$1"/bin "$1"/build "$1"/doc "$1"/include "$1"/lib "$1"/src; touch "$1"/build/Makefile; } extract() { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjvf $1 ;; *.tar.gz) tar xzvf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *) echo "'$1' impossible d'extraire avec 'extract'" ;; esac else echo "'$1' est un fichier invalide" fi }