(on a Linux system)
I have a large set of nested subdirectories on a filesystem. I would like to prune all directory paths that contain no files at all.
In other words I would like to delete every directory where there are no files in that directory or in any subdirectory of that directory recursively.
For all versions of find
If you have a newer version
May not be the best solution, but this script works:
(based partly on the answer to List all empty folders)