Linux Command 정리 #2

################################################################################ 현재 TTY 번호 알아내기 ################################################################################ $ ps ax | grep $$ | awk ‘{ print $2 }’ $ tty | sed -e “s:/dev/::” ################################################################################ 다른 계정의 명령어 진행 상황 보기 ################################################################################ $ tail -f /root/.bash_history ################################################################################ 전체 터미널 접속 현황보기 ################################################################################ $ w 10:41:45 up 1 day, 19:55, 6 users, load average: 0.96, 0.88, […]

Linux Command 정리 #1

################################################################################ 모든 파일에서 문자열 검색 ################################################################################ @@ R옵션 : 재귀검색 grep -R ‘New MySQL’ ./ 추가 팁들 ——————————————————————————– Task: Display only words ——————————————————————————– You can select only those lines containing matches that form whole words using the -w option. In this example, search for word ‘getMyData()’ only in ~/projects/ dirctory: $ grep -w -R ‘getMyData()’ […]