Recursively Delete Files from Command Line
I'm one of those people who can't stand a messy laptop; I don't keep around files I don't need and I refuse to install apps unless I absolutely need them. Unfortunately Mac OS X and Windows generate files whenever they like, like .DS_Store
and Thumbs.db
. Sure they serve their purpose but that doesn't mean the clutter doesn't annoy me.
If you want to recursively find delete files you don't want, there's a simple way to do that:
find . -name '.DS_Store' -type f -delete
You can use *
as a wildcard too:
find . -name '*.zip' -type f -delete
Of course my cleanup only lasts a short time, but hey -- you can use this command for more intelligent purposes!
CSS filter support recently landed within WebKit nightlies. CSS filters provide a method for modifying the rendering of a basic DOM element, image, or video. CSS filters allow for blurring, warping, and modifying the color intensity of elements. Let's have...
I love almost every part of being a tech blogger: learning, preaching, bantering, researching. The one part about blogging that I absolutely loathe: dealing with SPAM comments. For the past two years, my blog has registered 8,000+ SPAM comments per day. PER DAY. Bloating my database...
Sometimes we're presented with unforeseen problems when it comes to our JavaScript effects. In this case, I'm talking about printing jQuery and MooTools accordions. Each "closed" accordion content element has its height set to 0 which means it will be hidden when the...
It's best practice to provide an indicator of some sort when performing an AJAX request or processing that takes place in the background. Since the dawn of AJAX, we've been using colorful spinners and imagery as indicators. While I enjoy those images, I am...
Interestingly. I only knew about
-exec
andxargs
.I use Asepsis for
.DS_Store
files: http://asepsis.binaryage.com/Just to mention that the order of the -delete flag is very important. Putting -delete flag first will make find try to delete everything below the specified starting point.
If you’re on Windows, the following will work the same:
Using
-iname
instead of-name
will ignore case.