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!
My trip to Mozilla Summit 2013 was incredible. I've spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out. MozSummit provided the perfect reminder of how brilliant my colleagues are and how much...
Google Plus provides loads of inspiration for front-end developers, especially when it comes to the CSS and JavaScript wonders they create. Last year I duplicated their incredible PhotoStack effect with both MooTools and pure CSS; this time I'm going to duplicate...
I'd bet one of the most used MooTools methods is the setStyle()
method, which allows you to set CSS style declarations for an element. One of the limitations of MooTools' setStyle()
method is that it sets the specific style for all medias.
This article serves as a first step toward mastering SVG element animation. Included within are links to key resources for diving deeper, so bookmark this page and refer back to it throughout your journey toward SVG mastery.
An SVG element is a special type of DOM element...
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.