Linux – Find last 10 modified folders.

This post will be updated, but for the mean time this should work:

find . -maxdepth 2 -type d -exec stat -c "%y %n" {} \; | sort | tail -n 20

Update 1:

This is much faster:

find . -maxdepth 2 -type d -printf "%TY-%Tm-%Td %TH:%TM:%TS %TZ %p\n" | sort | tail -n 20

🙂

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="">