%20%EA%B0%80%EC%9E%A5%20%EC%B5%9C%EA%B7%BC%EC%97%90%20%EC%88%98%EC%A0%95%EB%90%9C%20%ED%8C%8C%EC%9D%BC%2020%EA%B0%9C%EB%A5%BC%20%EB%B9%A0%EB%A5%B4%EA%B2%8C%20%EC%B0%BE%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
물론 출력을 가져와 find . -type f | xargs ls -l
Python 스크립트로 파이프하면 행을 정렬하고 상위 20개를 출력할 수 있습니다.
하지만 그것보다 빠른 것이 있을까요?
답변1
Mac OS X(10.10.2)에서는 다음을 시도해 보세요.
find . -xdev -type f -print0 | xargs -0 stat -f "%m%t%Sm %N"
stat
또는 직접 실행
stat -f "%m%t%Sm %N" /path
~에서man stat
In order to determine the three files that have been modified most recently, you could use the following format: > stat -f "%m%t%Sm %N" /tmp/* | sort -rn | head -3 | cut -f2- Apr 25 11:47:00 2002 /tmp/blah Apr 25 10:36:34 2002 /tmp/bar Apr 24 16:47:35 2002 /tmp/foo
3을 20으로 쉽게 바꿀 수 있습니다(-:
답변2
find . -xdev -type f -printf "%T@ %Tc %p\n" | sort -n | tail -20