사용자 도구

사이트 도구


wiki:os:linux:bashrc

문서의 이전 판입니다!


bashrc 커스터마이징

  • description :
  • author : 주레피
  • email : dhan@repia.com
  • lastupdate : 2020-01-31

Environment(환경변수)

#
D_YMD=`date +%Y%m%d`
D_Y-M-D=`date +%Y-%m-%d`
# 
TMOUT=0
export TMOUT D_YMD D_Y-M-D
export를 사용하면 하위 프로세스까지 환경변수가 상속됨

Alias

alias rlog='tail -n200 -f ${RSA_ROOT}/logs/javaLog/log_${D_YMD}.txt'
alias tlog='tail -n200 -f ${TOMCAT_ROOT}/logs/localhost.${D_Y-M-D}.log'
alias search='cd ${RSA_ROOT}/bin'
alias sfront='cd ${RSA_ROOT}/bin/html'

적용 방법

$> source ~/.bashrc
or
$> . ~/.bashrc

Example

# .bashrc
 
# User specific aliases and functions
 
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
HADOOP_INSTALL=/usr/local/hadoop-1.0.3
PATH=$PATH:$HADOOP_INSTALL/bin
 
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

Ref

/volume1/web/dokuwiki/data/attic/wiki/os/linux/bashrc.1580468703.txt.gz · 마지막으로 수정됨: 2022/03/10 19:52 (바깥 편집)