GNU Linux bash – how old are the projects files? find the last 10 most recently changed files in all subdris the current dir and display their change time like: (YYYY-MM-DD HH:MM)

find . -type f -exec stat --format="%Y %n" {} + | sort -nr | head -n 10 | awk '{print strftime("%Y-%m-%d %H:%M", $1), $2}'
2023-12-13 23:01 ./STRING/find.php
2023-12-11 19:32 ./STRING/search_replace.php
2023-12-10 22:20 ./.settings/org.eclipse.wst.common.project.facet.core.xml
2023-12-10 22:20 ./.project
2023-12-10 22:20 ./.buildpath
2023-10-28 17:31 ./YOUTUBE/detectYoutubeLinks.php
2023-10-28 17:31 ./XML/xml2object.php
2023-10-28 17:31 ./XML/php_errors.log
2023-10-28 17:31 ./XML/cast_string_SimpleXMLElement.php
2023-10-28 17:31 ./XML/artikel.xml
... nice

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin