Unix

파일 사이즈별로 나열하기

She쥐포s 2007. 11. 3. 21:13
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2343 - June  1, 2006

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

파일 사이즈별로 나열하기

파일 사이즈 별로 정렬된 목록을 보고 싶다면 다음의 명령을 사용할 수 있으며,
명령은 파일을 역순(Z, Y, X, ...)으로 나열한다. 만약 같은 일을 하위디렉토리까지
해야 한다면 두번째 명령을 사용할 수 있다.

ls -l | grep ^- | sort -nr -k 5 | more

ls -lR | grep ^- | sort -nr -k 5 | more
 
@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@
 
LISTING FILES BY SIZE

If you want to have a listing of the
files sorted by size, you can use the
following command(s), it will list
the files in decrease order. if you
need to do the same thing recursively,
you could use the second one.

ls -l | grep ^- | sort -nr -k 5 | more

ls -lR | grep ^- | sort -nr -k 5 | more
반응형