2014년 12월 6일 토요일
Linux File Redirection
http://www.tldp.org/LDP/abs/html/io-redirection.html
https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-i-o-redirection
파일 리다이렉션할 때 항상 헛갈리는 부분이 있었는데 검색을 통해 확실히 정리함.
( 위 사이트에 정리가 잘 되어 있었음. )
command &> filename
이건 stdout 과 stderr 을 모두 "filename" 이라는 파일로 redirection 하라는 의미.
command 2>&1
이건 file descriptor 2 번( stderr )을 file descriptor 1 번(stdout) 로 redirection 하라는 의미.
이것의 일반적인 표현은 command M>&N 즉 M 파일 서술자를 N 파일 서술자로 redirection 하라는 의미.
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기