유용한 명령어
여기서는 유닉스에서(리눅스를 포함한) 사용할 수 있는 명령어 중에서 유용하게 쓰일 수 있는 명령어만을 다루도록 한다.
alias
복잡한 명령어와 옵션을 간단히 입력할 수 있는 문자열로 치환한다.
#alias alias cp='cp -i' alias l.='ls -d .* --color=tty' alias ll='ls -l --color=tty' alias ls='ls --color=tty' alias mv='mv -i' alias rm='rm -i' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
alias 지정할 때
#alias fat81='echo woojong'
alias 해제할 때
#unalias fat81
alias 를 무시하고 원래의 명령을 실행하려면
#\cp
(\) 백슬래시다. 혹은
#/bin/cp
한다.
apropos
whatis DB를 검색해서 검색하는 명령어와 관련한 명령어를 찾아준다.
만일 명령어를 처음 사용한다면, DB를 업데이트 해주어야 한다.
#/usr/sbin/makewhatis -u # apropos jpeg cjpeg (1) - compress an image file to a JPEG file djpeg (1) - decompress a JPEG file to an image file jpegtran (1) - lossless transformation of JPEG files rdjpgcom (1) - display text comments from a JPEG file wrjpgcom (1) - insert text comments into a JPEG file
at
명령어나 스크립트의 실행을 예약한다.
#at 00:00 2004-02-1 warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh at> touch test2 at> <ctrl+d> job 1 at 2004-02-01 00:00
현재 등록된 작업 목록을 확인한다.
#at -l 1 2004-02-01 00:00 a root