본문 바로가기

Programming424

bash - Parameter Expansion ${parameter#word} ${parameter##word} The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches the beginning of the value of parameter, then the result of the expansion is the expanded value of parameter with the shortest matching pattern (the ‘‘#’’ case) or the longest matching pattern (the ‘‘##’’ case) deleted. If parameter is @ or *, the pattern removal o.. 2009. 3. 8.
cmd - source source 수정된 환경파일을 적용하고자 할 때, 재로그인 절차없이 적용하는 명령어 # source .bashrc .bashrc 파일 재적용 # . .bashrc . 을 사용해도 같은 명령어. 2009. 3. 8.
shell - 파일 다루기 스크립트 내에서 파일을 다룰 때 사용하는 것들 ##### ./bash ##### [ -f 파일명 ] 파일이 있는 경우 [ -s 파일명 ] 파일이 존재하고 내용이 있는 경우 [ -d 파일명 ] 파일이 아니고 디렉토리인 경우 [ -r 파일명 ] 읽기가 가능한 파일인 경우 [ -w 파일명 ] 쓰기가 가능한 파일인 경우 [ -x 파일명 ] 파일이 존재하고 실행 가능한 경우 [! -옵션 파일명 ] 옵션의 조건이 아닌 경우 ##### ./tcsh ##### (-e filename) 파일이 있는 경우 (-z filename) 파일이 존재하고 크기가 0인 경우 (-r filename) 읽기가 가능한 파일인 경우 (-w filename) 쓰기가 가능한 파일인 경우 (-x filename) 실행이 가능한 파일인 경우 (-.. 2009. 3. 8.
cmd - ulimit ulimit 리눅스에서 프로세스의 지원 한도를 볼 수 있는 명령어이다. 동시에 접속할 수 있는 계정의 숫자나, 각 계정이 접속해서 쉘 스크립트 파일이나 기타 다른 프로그램들을 실행할 때 생성되는 프로세스의 최대 개수를 지정하거나 알아보는데 사용한다. 프로세스의지원 한도에는 소프트한도와 하드한도가 있다. 소프트한도는 루트의 권한으로 그 한도를 조절할 수 있지만 최대 크기가 하드한도를 넘지 못한다. 하드한도를 조절하기 위해서는 커널에서 수정하여 재컴파일 해야 한다. # ulimit -Sa 소프트한도를 할아보는 명령어 # ulimit -Ha 하드한도를 알아보는 명령어 # ulimit -u 1024 max user processes의 소프트한도를 1024로 변경하는 명령어 2009. 3. 8.
VI 설정 저장 방법 # 자신의 홈디렉토리에 있는 .vimrc 파일에 해당 설정을 적어둔다. ~/.vimrc set nocp set ts=4 set sw=4 set showmode set ai set nu # 환경변수에 해당 설정을 넣어둔다. (.bash_profile) EXINIT='set nu ai ts=4 sw=4 syn on' export EXINIT 2009. 3. 8.
시스템에서 사용되는 포트 /etc/services # Network services, Internet style # # Note that it is presently the policy of IANA to assign a single well-known # port number for both TCP and UDP; hence, officially ports have two entries # even if the protocol doesn't support UDP operations. # # Updated from http://www.iana.org/assignments/port-numbers and other # sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/servi.. 2009. 3. 7.