=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-­=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-­=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2472 - October  8, 2006

                   http://www.ugu.com/sui/ugu­/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-­=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-­=-=-=-=-=

조건적으로 core 파일 지우기

조건적으로 core 파일을 찾아서 지우기 위해서는:

프롬프트> find ~ -name core -exec file {} \; -exec rm -i {} \;

file 명령어는 어떤 실행 파일이 core 파일의 원인인지 보여주고 rm의 -i 옵션은
파일을 지울것인지 말것인지를 선택할 수 있게 해줄 것이다.

################# 예제 #################
프롬프트>  find ~ -name core -exec file {} \; -exec rm -i {} \;
/my/home/core: ELF 32-bit LSB core file of 'netscape-commun'
(signal 3), Intel 8
rm: remove `/my/home/core'? y

@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@

REMOVING CORES CONDITIONALLY

To find and remove core files
conditionally:

PROMPT> find ~ -name core -exec file {} \; -exec rm -i {} \;

The File will show which
executable the core file is
for and the -i option to rm
will allow you to choose
weather to delete it or not.

################# EXAMPLE ##############################­#
PROMPT>  find ~ -name core -exec file {} \; -exec rm -i {} \;
/my/home/core: ELF 32-bit LSB core file of 'netscape-commun'
(signal 3), Intel 8
rm: remove `/my/home/core'? y

반응형
Posted by She쥐포s

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함