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


@ 응용해서 현재 디렉토리부터 서브티렉토리 까지 전부 찾으면서 가장큰사이즈가 큰녀석을 asc 하게 리스트하기.

find ./ -name *.log | xargs ll -tr | sort -n -k 5


'Computer Science > UNIX' 카테고리의 다른 글

UNIX grep 옵션 -v 설명  (0) 2009.05.28
UNIX - ln (link files and directories)  (0) 2009.05.06
UNIX grep Command  (0) 2009.02.10
UNIX bdf 명령어  (0) 2009.02.02
UNIX cut 명령어  (2) 2009.01.29
페이스북 댓글
티스토리 댓글

+ Recent posts