Bash 쉘 초기화 파일 내용 검색

Bash 쉘 초기화 파일 내용 검색

1 명령어[ | ]

ll /etc/profile.d/*.sh /etc/profile /etc/bashrc ~/.bashrc ~/.bash_profile | awk '{print $NF}' | xargs grep -n 검색문자열

2 실행예시[ | ]

[root@zetawiki ~]# ll /etc/profile.d/*.sh /etc/profile /etc/bashrc ~/.bashrc ~/.bash_profile | awk '{print $NF}' | xargs grep -n PATH
/etc/bashrc:49:        case ":${PATH}:" in
/etc/bashrc:54:                    PATH=$PATH:$1
/etc/bashrc:56:                    PATH=$1:$PATH
/etc/profile:12:    case ":${PATH}:" in
/etc/profile:17:                PATH=$PATH:$1
/etc/profile:19:                PATH=$1:$PATH
/etc/profile:55:export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
/root/.bash_profile:10:PATH=$PATH:$HOME/bin
/root/.bash_profile:12:export PATH
[root@zetawiki ~]# ll /etc/profile.d/*.sh /etc/profile /etc/bashrc ~/.bashrc ~/.bash_profile | awk '{print $NF}' | xargs grep -n TMOUT
/etc/bashrc:87:TMOUT=300
/etc/bashrc:88:readonly TMOUT
/etc/bashrc:89:export TMOUT

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}