T
Thorsten Ball
Ich dachte es könnte ganz interessant werden, wenn man einen Thread hat indem man
sich ein paar Tricks, die andere in ihrer RC-Datei haben, abgucken kann. Also dann mal los:
~/.bashrc
Gruß,
Thorsten
sich ein paar Tricks, die andere in ihrer RC-Datei haben, abgucken kann. Also dann mal los:
~/.bashrc
Code:
# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"
alias lh="ls --color=auto -lh"
# You will thank me for this one day.
alias rm="rm -i"
# Biggest file in directory
alias ducks='du -chks * |sort -rn |head -11'
# Nano
alias nano='nano -w'
# Screen
alias screen='screen -R -D'
# Bittorrent
alias bt6='btdownloadcurses.py --max_upload_rate 6'
alias bt12=' btdownloadcurses.py --max_upload_rate 12'
# cplay with random playlist
alias cplay='cplay -R'
# ssh aliases
alias 1='ssh gate.0x42.com'
# Function to search in bash history (thanks to OneOfOne)
hs()
{
grep --color=auto -irn $* $HOME/.bash_history
}
# Search for string in files through dirs and subdirs (thanks to darkless)
alias finn='find . | xargs grep -HnI --color=auto'
# Change the window title of X terminals
case $TERM in
xterm*|rxvt|Eterm|eterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac
# Standard
source /etc/profile
# Add my python-scripts to $PATH
export PATH=$PATH:/home/mrnugget/Dev/Python/
# Extended bash-completion
[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion
# Set prompt
export PS1="\[\033[33m\]\t\[\033[01;00;0m\] [\[\033[34m\]\u@\h\[\033[01;00;0m\]][\[\033[32m\]\w\[\033[01;00;0m\]]\$ "
Gruß,
Thorsten