Find Empty Directories from Command Line


As a software program engineer that lives an excessive amount of of his life on a pc, I like conserving my machine as clear as potential. I do not maintain rogue downloaded recordsdata and removes apps once I do not want them. A part of conserving a clear, performant system is eradicating empty directories.

To determine empty directories, I take advantage of the next command:

discover . -type d --empty

To take away empty directories, we will add a --delete flag:

discover . -type d --empty --delete

Retaining a clear machine is simple when you already know the instruments that may enable you. discover makes figuring out and eliminating simple, so do not be afraid to make use of it!



Source_link

Leave a Reply

Your email address will not be published.