CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): Kevin (착한만두)
날 짜 (Date): 1996년01월08일(월) 20시00분25초 KST
제 목(Title): [A] find 사용시



find 사용시 에러 메세지는 standard error 로 나가는 것이므로

이것을 다른 쪽으로 redirection 하면 됩니다. 즉 standard out 과 standard error를

분리하면 됩니다. 지금 유닉스 관련 책이 없어서 on line 상의 man을 보니, 

     The only way to direct the standard output and standard error separately
     is by invoking a subshell, as follows:

          example% (command > outfile) >& errorfile

이렇게 되어 있네요.

이걸 이용하면 다음과 같이 하면 되겠군요

  alias ff "(find / -name \!* -print > /tmp/temp) >& /dev/null; cat /tmp/temp; 
rm /tmp/temp"

 ff filename

좀 복잡하죠?:) find 주위에 괄호 잊지 마세요!

redirection을 따로 하는 방법이 있을텐데..지금 책이 없어서 죄송~

:)


[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.