LINUX44
현재 쉘(SHELL)의 PID 확인 방법
# echo $SHELL /bin/bash # ps $$ PID TTY STAT TIME COMMAND 12633 pts/1 S 0:00 -bash # echo $$ 12633 "$" 변수는 현재 쉘의 프로세스 아이디(PID)를 가지는 변수이다.whereis, which 명령어 차이
# whereis bash bash: /bin/bash /usr/share/man/man1/bash.1.gz # which bash /bin/bash whereis 명령은 명령의 실행파일, 소스, 맨페이지의 위치를 검색하는 명령이고, which 명령은 환경 변수에 지정된 PATH 변수의 경로 내에서 실행 파일의 이름을 검색할때 사용.du, sort 명령어 조합
# du -h * | sort -nr > $HOME/script.txt * du - estimate file space usage * -h, --human-readable * sort - sort lines of text files * -n, --numeric-sort (compare according to string numerical value) * -r, --reverse (reverse the result of comparisons, 내림차순)리눅스 머신 초기 설정 정리
---------------------------------------------------------------1. vi 에디터 설정 # vi /etc/vircset tabstop=4 (탭의 공백 문자 개수를 4개로 지정)set shiftwidth=4 (shift 이동시 사용할 공백 문자의 개수를 4개로 지정)set smartindent (엔터를 입력하여 다음 라인 이동시 들여쓰기)set cindent (C언어 코드 작성 시 C문법 스타일 맞추기) # source /etc/virc ---------------------------------------------------------------2. ls명령시 날짜 포맷 변경 # vi /etc/bashrcalias ls='ls --color=auto --..반응형