Locate Empty Directories from Command Line
As a software engineer that lives too much of his life on a computer, I like keeping my machine as clean as possible. I don't keep rogue downloaded files and removes apps when I don't need them. Part of keeping a clean, performant system is removing empty directories.
To identify empty directories, I use the following command:
find . -type d --empty
To remove empty directories, we can add a --delete
flag:
find . -type d --empty --delete
Keeping a clean machine is easy when you know the tools that can help you. find
makes identifying and eliminating easy, so don't be afraid to use it!
Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...
Once concept I'm very fond of is lazy loading. Lazy loading defers the loading of resources (usually images) until they are needed. Why load stuff you never need if you can prevent it, right? I've created LazyLoad, a customizable MooTools plugin that...
One of my favorite uses of the MooTools JavaScript library is the SmoothScroll plugin. I use it on my website, my employer's website, and on many customer websites. The best part about the plugin is that it's so easy to implement.
I recently ran...
A minor change as it should have a single ‘-‘ on the empty predicate: