Delete empty files and directories
DestructiveDeletes every empty file and empty directory under the path and prints each one it removes.
Destructive: this command can permanently delete data. Check every value before running it.
find path -empty -delete -printEdit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/find.md), licensed under CC BY 4.0.