Preloader image
DDD

리눅스

find 결과 "허가 거부됨" 제외 하고 출력 하기

작성자 관리자 (admin)
조회수 203
입력일 2021-10-22 10:28:10

Questions)

$ find / -name tree

..
find: /usr/local/tomcat8/conf: 허가 거부됨
find: /usr/local/tomcat8/bin: 허가 거부됨
..

Answer)

$ find / -name tree 2> /dev/null

/lib/modules/2.6.32-696.18.7.el6.x86_64/build/include/config/tree
/lib/modules/2.6.32-696.18.7.el6.x86_64/source/include/config/tree
/usr/include/boost/spirit/tree
/usr/bin/tree
/usr/share/doc/gtk2-devel-2.10.4/examples/tree

파일로 저장하기

$ find / -name tree 2> /dev/null > 123.txt

 

^