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!
This is the hardest thing I've ever had to write, much less admit to myself. I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life. All of those feelings were very...
CSS animations aren't just for basic fades or sliding elements anymore -- CSS animations are capable of much more. I've showed you how you can create an exploding logo (applied with JavaScript, but all animation is CSS), an animated Photo Stack, a sweet...
A big part of the sexiness that is Apple software is Apple's use of opacity. Like seemingly every other Apple user interface technique, it needs to be ported to the web (</fanboy>). I've put together an example of a sexy opacity animation technique...
One of the more impressive MooTools plugins to hit the Forge recently was The Wall by Marco Dell'Anna. The Wall creates an endless grid of elements which can be grabbed and dragged, fading in elements as they are encountered. Let me show...
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.