spring cleaning
some days you gotta clean that 400 gigabytes of old data off your linux system. But you don't want to blow everything away, just those massive data files in hundreds of sub-folders. Sure you could go into each folder and pick them off one-by-one like some crazed data sniper, but that time is better wasted spent searching wikipedia to find out whether arabic is a semitic language (quick answer: it is). Instead,
find . -name *.data -exec rm -rf {} \;
it's like selective dran-o for your linux files. Now doesn't that feel better?
find . -name *.data -exec rm -rf {} \;
it's like selective dran-o for your linux files. Now doesn't that feel better?



5 Comments:
Love Wiki.
Do you know that my damn iPhoto stores pictures in folders within folders within folders? Why does it do that? I hate that!
As a result, I have a lot of spring MacBook reorganizing to do. Ugh.
And on another note, med students use Wiki all the time just like this...
Go see a patient.
Push on something.
Patient says, "ouch!"
Med student thinks, "Shit, what the hell is that thing called that I just pushed on?"
Run to computer, pretend to be checking labs.
Wiki search.
Ah...there it is.
Armed with fancy medical vocabulary, presents patient to attending..."Mr. X is a 47 year old male who presents today with nausea, vomiting, and pain on the anterior surface of his leg in an area called the knee."
katie and I have a running list of everything we need to look up on wikipedia. why is so much water required to make paper? are amphibians also reptiles?
we want a little wikipedia device with us at all times. I suppose we could get fancy web-surfing cell phones, but it seems like overkill. We just want wikipedia.
I'm impressed. You even got the spacing correct in the find command. Most folks try to put the back-slash right after the braces, instead of having a space between the two. Of course, wiki is yer friend.
:-)
If only Spring Cleaning at home were that easy.
find \home\ -name dust.* -exec rm -rf ...
Post a Comment
<< Home