It wasn't me. You can't prove anything.


2008-07-14

'OH Shit' Moment

So, there I was today trying to figure out what files under my user folder I could get rid of. I ran a command that allows you to tell how much data is stored under each folder.

> du -hs .*

'du' is short for disk usage. The 'h' and 's' control the output and make it readable.  I kicked it off and went to do something in the lab. I came back and saw the following.

...
../billy/projects permission denied
../Joe/docs permission denied
../Amanda/mail permission denied.
...

This feeling of dread came over me because my user folder is on the same drive as every one else's. In that split second of seeing every one else's name just pass by with a permission warning nearly gave me a heart attack. I thought for sure I had deleted the entire user drive. It felt like i had been punched in the stomach.

The 'du' command is read only. Still, even knowing that, my heat skip a beat. I guess this is a good thing. The proper command to use is something like the following.

> du -hs `find ./ -type d -mindepth 1 -maxdepth 1`

This got me the information I needed.

No comments: