Or how about a fuser filesystem on Linux to do the same? That sounds like an interesting idea. Just don't make the mistake of accidentally typing some obscenely large binary like firefox, chrome, or clang...
I think it would need to be integrated into the package management system pretty tightly (or have one of its own) to get all of the shared library dependencies.