1.7 million empty directories under /private/var/folders/.../com.apple.metadata.mdworker/
I was wondering my OmniDiskSweeper kept crashing on me, so I decided to run 'opensnoop' on the process and see what the final item it was examining was. It was /private/var/folders/x7/83y6yl750knffcx262sw1lbm0000gn/C/com.apple.metadata When I tried to 'ls' it, it hung, 'ls -f' also hung, 'find ... print' hung. In the end, I wrote a small perl program to "opendir" and then "readdir" and count the items. There were 1,736,396 empty directories contained there.
Normal Unix utilities failed to start removing, so I modified my program to 'rmdir' each one.
Now, Omnidisksweeper works and I'm guessing a lot more will work as well.
Any ideas why com.apple.metadata.mdworker should have so many empty subdirectories?
Since I removed them a couple of hours ago, another 370 have appeared.
Running fully patched Mojave 10.14.6