블로그 이미지
루미넌스
There are only 10 types of people, those who understand binary and those who do not.

calendar

    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
2006/11/02 21:57 Dev 노트

이번에는 ~/.bashrc다. ㅎㅎ;;
.bashrc에는 bash 환경변수 등 각종 설정이 들어가는데, 이건 호스트마다 다를수 밖에 없다.
그래서 항상 같은 .bashrc를 가지고 다닌다는건 아무 의미가 없다.
하지만! alias는 손에 익어 버리면 그 습관땜에 번거롭다는거~ 그래서 난 alias를 가지고 다닌다..ㅋ;;
귀차니즘;;

~/.bash_profile과 ~/.bashrc는 어떤 tty에서 접근하는가에 따라, 그리고 shell의 parent에 따라 하나가 선택되어 로드되지만, 대부분의 UNIX/LINUX operator들은 계정 홈의 .bash_profile은 .bashrc를 소싱하도록 설정해 준다.

[CODE type=bash]
# .bashrc
# 보통 ~/.bashrc는 이렇게 생겼다.
#
# User specific aliases and functions
source $HOME/.aliases # 이 라인만 내가 만든 것

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
f

# blah~blah~blah~ (이하 생략)
[/HTML][/CODE]

[CODE type=bash]
# ~/.aliases
#
## Basic aliases
alias ls='ls --show-control-chars -FB --color=auto'
alias l='ls -l'
alias ll='ls -al'
alias la='ls -a'

alias du='du -h'
alias dus='du -s'
alias df='df -H'

alias cls='clear'

#
## aliases for Tape-ARchive(tar)
alias tart='tar tvzf'
alias tarc='tar cvzf'
alias tarx='tar xvzf'

#
## aliases to excute specific applications
alias man='man -a'
alias cat='cat -n'
alias pu='\ps u'
alias ps='\ps -afl'
alias pl='ps -L'

#
## Diagnostics
alias meminfo='echo "/proc/meminfo:"; cat /proc/meminfo; echo "/proc/swaps:"; cat /proc/swaps'
alias cpuinfo='echo "/proc/cpuinfo:"; cat /proc/cpuinfo'

#
## env values
export LANG=ko_KR.eucKR
export LESS="-r"
[/HTML][/CODE]

Creative Commons License
posted by 루미넌스