Introducing: topnfiles

2 troelsarvin 1 8/17/2025, 4:02:45 PM troelsarvin.blogspot.com ↗

Comments (1)

troelsarvin · 2h ago
Surprisingly often, I find myself needing to find the n most "something" files. Examples:

In a large and deep directory structure of configuration files, where has the most recent change activity happened?

In a nested directory of (many) uploaded files, where are the 10 oldest files?

There doesn't seem to be a good, existing command line tool for this. One can chain together six unix tools: https://troelsarvin.blogspot.com/2024/09/find-recently-updat...

But the chained method is not as fast and light-weight as I'd like, especially when dealing with a file system that has a huge amount of files.

So I have written a little tool that you may also find useful. I've called it "topnfiles".