Frases

terça-feira, 29 de setembro de 2009

Aliase's para seu .bashrc

# Interpreter aliases
alias py='python'
alias rb='ruby'
alias pl='perl'

--
# Package management aliases
alias install='sudo aptitude install'
alias reinstall='sudo aptitude reinstall'
alias uninstall='sudo aptitude purge'
alias update='sudo aptitude update && sudo aptitude full-upgrade'

--

# Extrair arquivos
extract () {
if [ -f $1 ] && [ -r $1 ] ; then
case $1 in
(*.tar.bz2|*.tbz2) tar xjf $1;;
(*.tar.gz|*.tgz) tar xzf $1;;
(*.bz2) bunzip2 $1;;
(*.rar) rar x $1;;
(*.gz) gunzip $1;;
(*.tar) tar xf $1;;
(*.zip) unzip $1;;
(*.Z) uncompress $1;;
(*.7z) 7z x $1;;
(*.deb) sudo dpkg -i $1;;
(*.rpm) sudo alien -dik $1;;
(*) echo "extract: unsupported format $1" ;;
esac
else
echo "extract: file not found or unreadable: $1"
fi
}

--

alias cd-on="mount /dev/cdrom /cd"
alias cd-off="umount /dev/cdrom"

--

alias instalar=’apt-get install’

alias remover=’apt-get remove

alias buscar=’apt-cache search’

alias upgrade=’apt-get upgrade’

alias update=’apt-get update’

Nenhum comentário: