Organize Your .emacs in 5 Minutes

Perm url with updates: http://xahlee.org/emacs/organize_your_dot_emacs.html

Organize Your .emacs in 5 Minutes

Xah Lee, 2010-04-03

This article shows you a quick way to organize your emacs init file.

Most emacs users, have tens or hundred lines in their emacs init file, accumulated over the years. Large emacs init files makes emacs starting slow, and is a problem when you upgrade emacs, or install a new package.

So, how do you organize it? When it comes to organization, many of us, probably think it'll take a lots times and discipline, or with some special principle, system, to keep the .emacs file clean. From what i've seen in the past decade, vast majority of emacs users simply have one huge messy pile of stuff in “.emacs”, and this situation often is cited as their reluctance to upgrade to the latest emacs release.

Personally, i find that elaborate rule or system or time spend on organizing emacs init file is actually not productive.

Split Your .emacs into Multiple Files

When you need something, you pile it in your “.emacs” and you can immediate go back to work on things you need done. That is the beauty of it. The best way i find in keeping “.emacs” organized, is just to break them into 2 or more files and spend no more than 5 minutes doing it. Here's how i do it.

Go to your “.emacs”. If the file has more than say 2 hundred of lines, then just go to the middle and split the file into 2 files. Say, name it “emacs_init_1.el” and “emacs_init_2.el”. The exact file name doesn't matter. Then, in your “.emacs”, change it to like this:

; my emacs customization
(load "emacs_init_1")
(load "emacs_init_2")

That's it. The key to keep in mind is that you should not spend more than 5 minutes on this. If you spend more, you are likely being less productive than you could've been.

When next time you have more code you want to add, just pick a file and add there. Each time, spend no more than 5 minutes doing it.

Rename File When Needed

Within that 5 min, you can shuffle the file content a bit. For example, moving some important customizations into one file, less important ones into the other. Also, you are free to creat new files and name it properly, such as “emacs_init_critical”, “emacs_init_elisp_functions”, “emacs_init_keybindings”, “emacs_init_mswin”, “emacs_init_home”.

This way, you have your “.emacs” under manageable condition, without much effort. You may edit your “.emacs” once a month, or if you are a heavy emacs experimenter, perhaps once a week. Gradually over the years, you may have multiple emacs init files, all manageable and reasonably organized.

Byte Compile Optionally

If you want, you can compile the elisp files to make it load AND run faster. (a compiled elisp will not only load faster, but the functions/commands will run about 6 times or more faster.)

To compile, just type “Alt+x byte-compile-file”.

Note that when you use “load” like this “(load "emacs_init_1")”, emacs will first try to load the byte compiled version “emacs_init_1.elc” first. If it doesn't exist, then emacs will try to load “emacs_init_1.el”.

On flaw with compile is that, if you ever edited or added new code, you need to remember to compile it again, else emacs will just load the compiled version that doesn't have your changes.

Compile Packages

When you downloaded some elisp package, usually you want to byte compile it. Other than that, little things like font changes, variable changes, hooks, personal keybindings, or other minor settings, byte compile doesn't make any noticeable difference. Personally, i have all packages byte compiled, but otherwise my init files are not byte compiled, because it is a pain to remember to byte compile it again after edit. (some emacs fan has cooked up schemes to have emacs automatically byte compile a file after edit... but for me that's getting more complicated and not really needed.)

Limit To 5 Minutes!

Again, my experience is that you should not fret about it. Some type of coders, like me, tend to think of some beautiful organization scheme. For example, you can organize the files by importance, or by OS (Linux, Windows, Mac) for those using multi OSes, or you can organize by work vs home, or organize by machines you have access, or organize by the type of of customization (e.g. keybindings, UI changes (font, frame, window position, background color), functions, type of packages...), or, you might start to rewrite the code so that they are all some consistent style. Each time you mod your init file, 5 min becomes 10 min, then you thought “O, but maybe now i should do this”, and the time spend on this often becomes 30 minutes, 1 hour.

Need Based

What i find the most effective, is simply a need based one. If i started to spend more than 5 min on modding my init file, i ask my self “do i really NEED to do this?”. If no, i stop and let things be. Until someday, when i have some extra time to study emacs for the sake of studying, then i may choose to spend time with my emacs init files, looking into what are there, which's important, how the code works, etc. Most likely, there are many other areas in emacs one can study more fruitfully than fretting with getting init files into a pristine condition.

PS my init files are here: Xah Lee's Emacs Customization File.

A Personal Drivel On Facebook Social Networking Site's Dating Advertisement

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/facebook_snippet.html

Facebook Dating Ads

Xah Lee, 2010-04-03, 2011-02-19

Facebook girl Facebook girl
Facebook girl Facebook girl

Gah, am quite annoyed by the bunch of pretty girls staring at me on the side of Facebook. What the fuck. Am not interested in spending time and energy to go thru these spammy sites and deal with women with the possibility of reward of touching set years down. I noticed there's a little x that lets me close it. Tried it, then fuck Facebook asks my reason by multiple choice for not liking the ad, which kicked my mind into deliberation.

O, do i really want these pretty girls decorating my Facebook gone? what if i'm axing a big OPPORTUNITY? The op to get into their pants as well the op to observe humanity of ad distribution and demograph.

(after all, i'm getting into online ad biz. Need to be observant. (as a example, one thing i learned after some dithering, is that i wondered why these ads always just girls looking for men. I figured, if you are a women, your Facebook probably show all these powerful men waiting for you. So, the ad selection algorithm must've filched info from your profile))

Facebook girl Facebook girl Facebook girl

And, what reason should i give? fucking Facebook takes every chance to squeeze info. Should i be generous in freely providing them the reason? But, on the other hand, i support capitalism to the hilt. By turning off ads, will i be said of deeds not matching words?

Gah. I admit i have psychological problems. Some loving female please press bosom onto my face and fix me. Have some Platonic heart!

✻ ✻ ✻


The wile of facebook dating ads:

  • “Browse Pics/Don't Commit”
  • “click once for pics” (speeddate)
  • “See Pics of Singles, FREE”
  • “Click to See More Pics”
  • “Date Rich Women”
  • “Single? Over 40?”
  • meet Asian singles.
  • date model girls.
  • date homely girls.
  • find single moms here.
  • pickup Christian girls.
Facebook girl 16 Facebook girl 17


The photos vary from blossoms of tits n ass to beaming face of beauty queens to girl-next-door photo to disgusting juxtapositioned old men + young girl.

Reminds me, i need to update my collection.

One guy in Second Life, from UK, read my essay above, and apparently is totaly freaked out. (of me, not the girly ads)

Facebook girl 442 Facebook girl 737 Facebook girl 858 Facebook girl 859

Pretty Face Collection

Facebook girl Facebook girl Facebook girl Facebook girl pretty face 836 Facebook girl face 2

Tits & Ass Collection

Facebook girl 14 Facebook girl 15 Facebook girl tits 836 Facebook girl legs 2 Facebook girl

Important Offensive Oldmen Collection

Facebook girl fat man 857 Facebook girl old man 333 Facebook girl old man 443 Facebook girl old man 526

Do you look like one of these disgusting men? If so, you have a chance!


Facebook girl local

The Heart of Wikipedia

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/t2/wikipedia_engine.html

The Heart of Wikipedia

Xah Lee, 2005-11-03

A key to the success of the engine of Wikipedia (http://en.wikipedia.org/) , is that of accumulation.

Any little tip, any little tweak, any iota of insignificance, may it be starting a article with a single sentence of worthless fact, to grammarian's obsessive tweak of a wording in a sentence, stays.

This staying power, constitute a core element of Wikipedia's success. Let me explain why.

Wikipedia started in 2001. Now, the internet and collective collaboration, especially in software, existed more than a decade before that. One telling example is newsgroup's FAQs. In as early as 1995, there are tremendous number of very well written FAQs, in topics ranging from math & sciences to the how-to's of Sadomasochism. Let's see, there are FAQs on C-programing language, on Artificial Intelligence, on Computational Geometry, on computer keyboard typing injury, on Piano, on Piano playing, on movies and actresses, on porn videos and industry, on the fine points of English writing, on anal sex, on sadomasochism dos and don'ts...etc.

These are not trivial writings, in particular content-wise. They are usually condensed summary of the subjects in question, and subjects usually you can't find in academia, with respect to the content or the writing format.

These FAQs, being Questions & Answers, are extremely practical and to the point. For instance, in SM play, they tell you where to find local clubs, what's the procedure or process of writing a contract for a sexual slave, and enlist the scientific fact of the capacity of human intestine for holding liquid for enema play, or the effects of beer enema, and so on. And, depending on the subject matter, they often have a section of references and books in case you want to know more.

These FAQs arose from early online forums, i.e. newsgroups. Thru years of online discussions, often by experts in question, some commonly asked questions and their collective answers have naturally been formed and gathered, producing these FAQs. These FAQs, number in thousands, are unprecedented collection of human literature, in a class of their own. Their like may have existed in the form of some unknown pamphlets or reference here or there on this or that subjects, but never in such quantity, quality, and ubiquitousness. Many of these FAQs, have reached a quality and usefulness that they are in fact published as books. (for example, the FAQ on C programing language) The acronym FAQ itself have become a household term and appeared shamelessly in modern English dictionaries. If there is any precedence to Wikipedia as human literature made thru internet, it is these FAQs.

With the commercialization and bloom of the internet, technologies such as mailings lists, web-based forums, instant messaging, online-journals (blogs) have progressively came into existence, with the consequence that revolutionarily expanded the efficiency and magnitude of human communication, of all possible human subjects. Then, sometimes about the year 2000, came FAQ-o-Matic, and wiki, and was born Wikipedia.

As we know, Wikipedia today is of undeniable usability, in many cases and aspects matching or surpassing those of professionally published commercial encyclopedias as well as specialized dictionaries, compendiums, annals, or the entire collection of FAQs.

If Wikipedia is such as success, we wonder, what's in it that made it so. In FAQs, we note that it is the culmination of piece-wise addition by a subject-loving collective, and that is the key: piece-wise. Great many a person in the world possess professional level knowledge of subjects. If you have written a book, you know that the process is daunting, not because you lack the subject's expertise, but the associated drudgeries and tasks around actually putting it into a organized presentation. But if you love a subject, and don't plan to write a book, in discussions your expertise flows freely, bypassing any research you might need to do, and thru collective efforts they easily form into a more well-organized presentation as FAQs, without ado about completeness, formality, or painstaking correctness but nevertheless invaluable. Still, these FAQs need someone to actually form their existence, and most of the time are the (editing) work of a single person. Even all the pieces of materials exist and are written as message posts, the task of collecting into a coherent whole with consistent style and maintain it is still dreary. This problem, of the drudgery of knowledge presentation came away with the arrival of the wiki technology. Wiki (aka Content Management Systems or web revision system), the software engine behind Wikipedia and other similar projects, is at heart a database with a interface, where anyone can use the web browser to add info or edit existing info. So, the one most pesky labor of knowledge presentation went away.

Any joe, can start or edit a piece of info. Regarded by themselves, are trite and insignificant to the point of entirely useless by all measures and judgments. However, the cumulative effect is so powerful, that it essentially breaks the wall of writing a book. And, since Wikipedia is not narrowly confined to a singe subject as in the bedrock of FAQ's forums, and Wikipedia abide a encyclopedia-style of writing instead of Questions & Answers, therefore Wikipedia becomes far wide in scope and encyclopedic in style, as we know it today.


Just read a insightful article on how Wikipedia grows. Is its content came from small percentage of Wikipedians who edit it everyday? or is it from the masses who don't even have a account? He used statistical means to find out.

Who Writes Wikipedia? (2006-09-04), by Aaron Swartz. Source


Gaming Headset Reviews

Perm url with updates: http://xahlee.org/sl/headsets.html

Gaming Headset Reviews

Xah Lee, 2010-04-01

I play in Second Life several hours a day. I had a 10 years old microphone. So, recently am shopping for a headset.

There are lots of headsets out there, from $10 to over a hundred. If you use headset casually, such as 30 min a day for online voice chat, then any $10 will do fine. I would recommend Microsoft, Logitech, or Sennheiser brands.

If you use headset for more than 1 hour a day, then, you need something comfortable, high quality, and with good microphone.

For gaming, usually you want the headphone part to be high quality, because otherwise music would sound bad, or you don't get the thundering “boom” effect when bombs go off.

Microphone is also important, because it'd be a headache when you trying to voice with someone and the message is repeated “can you hear me? can you hear me ok? ... wait i hear lots of white noise”.

There are 2 connector types for the headset. The cheap ones use analog plug, the same type of headphones. One plug for the microphone hole and another for the headphone hole. Better ones, usually over $20, uses USB. USB is better because it is digital, and it's just a single plug.

Microsoft LifeChat LX-3000 Headset

Microsoft LifeChat LX-3000 Headset

Microsoft LifeChat LX-3000

After few hours of research, i end up buying “Microsoft LifeChat LX-3000 Headset”. amazon ($25)

If you typically use headset for just 1 hour a day, i recommend this. The only problem with this is that if you wear it for more than 1 hour, it hurts your ears a bit, because of the prolonged light pressure on your ear by the earpad. Actually, this is the case for vast majority of headphones under $50.

Sennheiser PC151

Sennheiser PC151 headset

Sennheiser PC151

If you want to spend more, i highly recommend: “Sennheiser PC151 Over The Head Headset” (with Noise Cancelling Mic and In-line Volume Control) amazon. ($48)

Sennheiser is the best brand for high quality headphones. They are extremely light weight in comparison to similarly sized headset, and extremely comfortable for 5 or more hours of continuous wear.

I own a Sennheiser HD 570 headphone i bought for $120 in 2000. Now, it's been 10 years, and i still use it! The sound quality beats any headphone or hi-fi speakers that cost thousands of dollars.

Web Tech Stats 2010

Perm url with updates: http://xahlee.org/js/web_tech_2010.html

Web Tech Stats 2010

Xah Lee, 2010-03-31

This page reports the popularity of web technologies used today. For example, the popularity distribution of different content management system, javascript libraries, web dev language/frameworks, javascript libraries, visitor tracking packages, etc.


71% of sites are detected with a known language/framework/technology. Among them, here's a rough breakdown.

Framework stat


51% has javascript. Here's the distribution of known js packages.

JavaScript stat

Visitor Tracking

72% sites has some sort of visitor tracking tech.

analytics stat

Ad Services

57% of sites have ads.

ads stat


3% has blogs.

blog stat

Content Management System

4% uses CMS.

CMS stat


2% sites has ecommerce.

Ecommerce stat


22% has feeds.

Feeds stat


4% sites has media.

Media stat

Content Delivery Network

16% uses CDN. It is used for example to auto find the nearest server to distribute video.

CDN stat


30% sites has widgets.

Widget stat


60% uses utf-8. 40% uses iso-8859.

70% declared a encoding.


Info of this page is from trends.builtwith.com. Another useful site is backendbattles.com


Death of Sun Microsystems

Sun Microsystems is dead. I'm so glad. I hate Sun very much. Them with their aggressive marketing lies and jargons with java. They are the most abusive of marketing jargons of any tech company. Keeps creaing spurious, useless, jargons just for the purposes of marketing. Abusing the term API, Interface. Calling their OS as “Platform”, and there's JDK, JSDK, J2EE, J2SE, Tiger, version numbering abuse 1.x to 1.2 == Java 2 now 1.3, JavaOne, JFC, Jini, JavaBeans, entity Beans, Awk, Swing. And before my time, from SunOS to Solaris. Lies about open standards. In the first 5 or more years of java, where Java sky rocketed their sells of their Solaris OS and server hardware, but keept creating obstacles on a quality java on Linux, during the dot com days (~1997-2001) where Linux is also raging is its main threat. (we can safely say that Linux + Cheap PC won now.) And finally in their brink of commercial death, Sun Microsystems pulls the trick of saintly open sourcing Java like Netscape did.

See: On Microsoft Hatred, Jargons of Info Tech Industry.

Moving Porn out of XahLee.org

this page's content is removed due to possible incompatibilities with Google's AdSense. For the content, goto http://xahlee.org/sex/moving_porn_out.html

Take A Chance On Me

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/take_a_chance_on_me.html

Take A Chance On Me

Xah Lee, 2006-02

Take A Chance On Me, by ABBA. Written by Benny Andersson and Björn Ulvaeus, and recorded in 1977, sung by Agnetha Fältskog and Anni-Frid Lyngstad.

The lyrics goes as follows:

If you change your mind, I'm the first in line
Honey I'm still free
Take a chance on me
If you need me, let me know, gonna be around
If you've got no place to go, if you're feeling down
If you're all alone, when the pretty birds have flown
Honey I'm still free
Take a chance on me
Gonna do my very best and it ain't no lie
  ( / Gonna do my very best, baby can't you see)
If you put me to the test, if you let me try
  ( / Gotta put me to the test, take a chance on me)

Take a chance on me
(that's all I ask of you honey)
Take a chance on me

We can go dancing, we can go walking, as long as we're together
Listen to some music, maybe just talking, get to know you better

'cos you know I've got
So much that I wanna do, when I dream I'm alone with you
It's magic
You want me to leave it there, afraid of a love affair
But I think you know
That I can't let go


Take a chance on me
(come on, give me a break will you? )
Take a chance on me

Oh you can take your time baby, I'm in no hurry, know I'm gonna get you
You don't wanna hurt me, baby don't worry, I ain't gonna let you

Let me tell you now
My love is strong enough to last when things are rough
It's magic
You say that I waste my time but I can't get you off my mind
No I can't let go
'cos I love you so

What a sweetest song. The lyrics exceedingly describes a common condition among nubiles, and in its extreme sweetness and deference, of a lover soliciting a mate.

The human animals, when it comes to mating, have their own ways and methods. Elements of which have become peculiar items in pop culture, such as “pickup lines” and courtship etiquette, love songs. Let's look at the lyrics.

If you change your mind, I'm the first in line

Implied is that the target animal has showed disinterest in the past. And the line “first in line” is so sweet a line in that it shows the pursuer's meekness and deference, by putting forth acknowledgment of a presumed fact that the target animal would have a line of potential mates waiting, and yet she reminded him that she is the first.

Honey I'm still free

This line says a ton about courtship. “Honey” is the colloquial title of endearment. It is so because honey is sweet, and sweetness is a primal feeling of goodness among human animals. Primal because it came from food, and food is the one most important thing in a animal's life. Among feelings associated with food, sweetness is the most good because when a food item tastes sweet it means its composition has high sugar, the most vital form of carbohydrates, which is the primary chemical element of energy source. Among sweet food items, honey is the most universal. Sugar, saccharin, aspartame are modern, synthetic inventions only known in recent era. Beets, sugar cane fruit, molasses, ... are other sweet things, but none comes close to the universality or naturalness of honey.

And she pronounces, that “[she's] still free”. First of all let's look at the word “free”. Free of or from what? Ah, free from other love engagements. This “free” statement tells us that human animals usually court one at a time. Here, “free” means available, open to sexual solicitation. And, the issue of availability is often associated with the female sex. Long story of human sexual ethology aside, it is often the female's availability that's a issue. The short take is that females bear children, and one at a time, while males, are technically free at all times. (That is to say, copulation is biologically meaningful only approximately once a year for females. ). The opposite of “free” here would be “taken”, as that's the phrase sometimes used in courtship. (e.g. in movie Queen of the Damned, in song My Humps )

Note she said she's “still” free. That indicates, she isn't always free and may not remain free. So, there's certain urgency in the message. She implied that she's not gonna be free forever, and the point being: “better act now if you are going to want me at all.”

Take a chance on me

The rub in this line is that there's some uncertainty involved. Certainly, the mating process ain't a scientific routine. If anything, it's half a chance event, and relationship can break off anytime. In a courtship, it would be foolish to speak such a fact. But in a song, I note how sweet it is, to state such plain truth in supplication.

The next interesting line is

If you're all alone, when the pretty birds have flown

“Pretty birds” of course refers to pretty girls. Here, competition in mating is clearly seen. The matingship among animals are almost always fret with competition. In fact, competition in mating is a major cause of aggression. This is usually fiercest among males, sometimes fatal. Human males, start to fight for sweethearts starting at highschool. And among females, the competition is less pronounced. 'twas so, 'tis now. Today, we can see tidings of murder for love, on screen or in newspapers.

Besides competition, we gather that prettiness is a precious asset for human female animals when it comes to mate selection. And here, the singer told us and her target, diffidently yet critically, that she may not possess the best quality in prettiness, but she is available. As a proverb advises: “a bird in the hand is worth two in the bush.”.

Gonna do my very best and it ain't no lie

Apparently, lying is a common stratagem among human animal's walks of life. The proffering about “do my very best” indicates that human animals deal with other human animals differently, apparently do not always “do the best”.

If you put me to the test, if you let me try

Here's another sweet beseechment, gently saying she's not going to force a relationship. In courtship, sometimes a party can be pushy. For example, a man can keep showering his target with gifts, without much of the girl's encouragement. Or, a girl can “come on” to a guy, by repeated verbal or body language or displaying her flesh, where the guy showed no sign of interest. Aggressive courting is often a vexation to the receiver, because, there's nothing worse than being pursued by someone you are not attracted to.

'cos you know I've got, So much that I wanna do, when I dream I'm alone with you

The multiplication process of human animals is not just meet, copulate, departure. Once a sexual partnership has formed between a couple, usually they stay together as lovers for a significant period of time (e.g. few years), and do a whole lots of other non-sexual things together.

Note the phrase “along with you”. Although coitus and other intimacies do not technically require privacy, but are always done in private as a norm, out of complex social reasons not easily deciphered.

We can go dancing, we can go walking, as long as we're together

As noticed in the essay for ABBA's Dancing Queen, dancing is a fundamental ritual for mating, and is often the activity for newly engaged lovers.

Listen to some music, maybe just talking, get to know you better

Notable here is the “music”, which originated from natural sounds such as rain, thunder, sea-wave. Although music is not essential in human life, but with respect to entertainment, it is a fundamental mean.

It's magic

Things unknown or not understood are magic, which also comes with a positive connotation, as something wonderful. Here, magic or magicality is asserted in her wishful pitch.

You want me to leave it there, afraid of a love affair

Sometimes a love affair can be intimidating. Because, if it didn't go well, it can hurt and wreck a human animal in non-physical ways. “Blues”, depression, suicide for love are constant and perennial since time immemorial.

But I think you know, That I can't let go

Sometimes a sexual urge on a particular target can become a fixation. We have terms such as “crush”, “infatuation”, “having the hots [for]”. It can be obsessive and almost never explicable.

'cos I love you so

There she lays the ultimate edict. Of all lover's games and trickery, there's none as exigent, sincere, and heavy as “I love you”. One way or another, it is the show stopper.


Camille Paglia talks about religion

Camille Paglia talks about religion. It is electrifying to see her talk. Knowing that such a person exist, makes me feel life is worth living. See also:


Secure Deletion, File Shredding, on Windows

Perm url with updates: http://xahlee.org/mswin/file_shredding.html

Secure Deletion, File Shredding, on Windows

Xah Lee, 2010-03-28

This article tells you how to securely delete files on Windows Vista system, and current state of the art.

Recently i need to delete a folder, full of my online passwords, financial info, etc. As you know, removing to trash and empty trash won't work, because the data is still on disk.

Simple Method: Just Duplicate Files Till Full

In the past, when i don't have any disk management tools or don't want to use it, one way i make sure all my data on my disk are absolutely gone, is simply duplicating files until my disk is full.

Start by, copying the largest file you have (such as video file). You can just keep selecting all the files in the folder and keep duplicating. After a few times, your disk will fill up. Then, you start to duplicate a small file (say, 1 mega byte file). This is to make sure that all crannies in the disk sector are also filled. When the OS says disk full, repeat this again with even smaller file (say, 1k byte file).

This method, will at least erase all your files by over-writing them once. Your disk is probably still not clean if some FBI want to dig it, but good enough for selling your old computer.

The above method is simple, works ok, but will take you about 20 min manually. Right now, i simply wanted to remove a folder that's 40 megabytes, but i have some 200 giga bytes free space. Am not going to spend 20 min to manually copy files. Even so, it is quite questionable that tiny files (few k bytes) will be overwritten, because, modern OS, the file system, virtual file system, cache scheme, are quite complex. Simple methods as above just isn't reliable, time consuming, and have minor problems. (e.g. your OS might complain that disk is reaching full and impinging its virtual memory functionality and refuse to copy.)

So, i spend about 3 hours looking at file shredding today. Specifically, i need to find and choose a program that lets me shred files on Windows Vista.


After about 2 hours reading several articles, here's several trustworthy options i found:

At first, when i found the GNU's “shred” unix command line utility, and i thought i need look no further. Because i have cygwin installed on my Windows, and the program is there. I tried it, it works. However, reading its man page, quote:

CAUTION: Note that shred relies on a very important assumption: that the file system overwrites data in place. This is the traditional way to do things, but many modern file system designs do not satisfy this assumption. The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file system modes:

* log-structured or journaled file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

These days, as far as i know, most file systems are journaled in one way or another. So i can't say what's the relevance of “shred” anymore. Out with “shred”.

Some other tools mentioned above also seems noteworthy, many are open source, but often years old. In the 10 min or so i spent reading about each, i can't make sure they still work in Microsoft Vista. (open source ones are especially bad like that)

File shredding tools are low level, so you better be sure, else they screw up your files or disk partition and it's gonna be a big headache. Also, of course, make sure you backup first.

In the end, i just settled on SDelete. It's from Mark Russinovich of Sysinternals fame, who also wrote Process Explorer (i highly recommend).

From the SDelete's home page, it start with this paragraph, which goes to show how complex file erasure are these days:

One feature of Windows NT/2000's (Win2K) C2-compliance is that it implements object reuse protection. This means that when an application allocates file space or virtual memory it is unable to view data that was previously stored in the resources Windows NT/2K allocates for it. Windows NT zero-fills memory and zeroes the sectors on disk where a file is placed before it presents either type of resource to an application. However, object reuse does not dictate that the space that a file occupies before it is deleted be zeroed. This is because Windows NT/2K is designed with the assumption that the operating system controls access to system resources. However, when the operating system is not active it is possible to use raw disk editors and recovery tools to view and recover data that the operating system has deallocated. Even when you encrypt files with Win2K's Encrypting File System (EFS), a file's original unencrypted file data is left on the disk after a new encrypted version of the file is created.

How To Use SDelete

Here's a example of how i used SDelete:

sdelete -p 1 -s "c:\Users\xah\Documents\my secrets\"
sdelete -p 1 -z -c "C:"

Note, that the second line too some 4 hours for a 200 giga bytes of free disk space. Though, the CPU usage is below 5%.

Here's its usage:

Usage: sdelete [-p passes] [-s] [-q] <file or directory>
sdelete [-p passes] [-z|-c] [drive letter]
-c  Zero free space (good for virtual disk optimization).
-p passes Specifies number of overwrite passes.
-s  Recurse subdirectories.
-q  Don't print errors (quiet).
-z  Cleanse free space.

Wipe Once Is Enough!

In file shredding articles i've read in the past decade, it is said, a million times, that to be absolutely safe, you must overwrite the file n times, n being like 3 or 10 or more. I can understand that the magnetic disk tech do leave traces of previous bits, but i never really understood how tracing previous bits are really possible at the physics level, or why writing that many times is necessary.

One surprising thing i learned in one of the article is that, one time is enough today! I find that convincing. (see article below)

Some quotes from Data remanence:

Daniel Feenberg, an economist at the private National Bureau of Economic Research, claims that the chances of overwritten data being recovered from a modern hard drive amount to "urban legend".[3]

As of November 2007, the United States Department of Defense considers overwriting acceptable for clearing magnetic media within the same security area/zone, but not as a sanitization method. Only degaussing or physical destruction is acceptable for the latter.[4]

On the other hand, according to the 2006 NIST Special Publication 800-88 (p. 7): "Studies have shown that most of today’s media can be effectively cleared by one overwrite" and "for ATA disk drives manufactured after 2001 (over 15 GB) the terms clearing and purging have converged."[1] An analysis by Wright et al. of recovery techniques, including magnetic force microscopy, also concludes that a single wipe is all that is required for modern drives. ...

  • Disk Wiping – One Pass is Enough (2009-03-17), By Max. Source
  • Can Intelligence Agencies Recover Overwritten Data? (2003-07-21), by Daniel Feenberg, National Bureau of Economic Research. Source
  • Schneier on Security: File Deletion (2009-09-10) by Bruce Schneier. Source schneier.com

WTF is “Data Sanitization”?

Many articles uses the term Sanitization instead of just secure shred, wipe, erasure. What the fuck is with that? In short, it's basically a term used in government orgs borrowed from paper documents. It doesn't mean much other than emphasizing the highest degree of data security.

No Mention of SDelete?

Another thing i find bugging is that in the many articles i read talking about file shredding tools, none mentioned SDelete.

In hindsight, i probably should've used BCWipe. They have a free trial version, and is highly recommended and used by security experts.