'inode full'에 해당되는 글 1건

  1. 2010.11.25 [UnixTip] 파일시스템 inode full
파일 시스템 inode full

파일시스템의 inode 사용량이 100%로 full이 된 경우 파일이 많은 디렉토리를
찾기란 쉽지 않다. 만일 파일 사이즈가 작은 경우 du에 의존하기도 힘들다.

이 경우 다음의 명령을 사용하면 현재 파일시스템에서 디렉토리와 그에 속한
파일의 수를 출력할 수 있다.

find . -xdev -type d -exec /bin/echo -n "{} : " \; -exec sh -c "ls {} | wc -l" \;

옵션설명)
-xdev : 다른 파일시스템은 검색하지 않기
-type d : 파일 타입이 d인 경우(디렉토리), f : 일반파일, l : 링크
-exec : 명령 수행

※ 원문 내용에 첨삭함.

------------------------------------------ 원문 ----------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 3577 - November 25, 2010

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

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


FULL OF FILESYSTEM INODES

We recently had a problem where a file system had 100% inode usage.
Unfortunately there isn't an easy way to search for directories with
a lot of files in them (1 file = 1 inode). And if the files are small,
you can't rely on du to help you out.

Here is a find command that will print all the directories in the
current filesystem, with the number of files (inodes) in that directory.

find . -xdev -type d -exec /bin/echo -n {} \; -exec sh -c "ls {} | wc -l" \;

반응형
Posted by She쥐포s
이전버튼 1 이전버튼

블로그 이미지
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

최근에 올라온 글

최근에 달린 댓글

글 보관함