The results

I am exhausted. Didn’t get to sleep until after 3. Alpha bailed on us around 10, and went back to bed. Beta conked right out not long after. So I was stuck in the tent. All night. The ground was hard. Everything was wet with dew. But you know what? Watching Beta wake up in the morning, all snuggled up next to me was totally worth it.

Now if only I could walk without groaning…

Plans run afoul, but we intend to soldier on

Alpha and the tent
The plan for tonight includes camping!

We bought a tent a few months back, with the intention of trying this whole camping thing. I haven’t camped in years, and neither has Quinn. The girls think it is super cool and romantic and cannot WAIT to try it out. The summer is nearing its end, and we haven’t done it yet. We checked the weather, took out the tent, and put it up. As we’re doing this, we feel a couple of little sprinkles, more of a mist, but nothing big. There was nothing on the radar, and there is lovely blue sky above us. Nothing to worry about, right? Right.

Dramatic picture of the rain
This is the view of the rain down the street

The tent was set up. The kids put their blankets and toys in there. I have all the windows open to keep it nice and cool. Suddenly, the sky opens out of nowhere! I managed to get teh windows zipped up before the real rain started, and came inside (not sitting in an untried tent in a downpour). The view down the street was beautiful, with the sun shining brightly through the downpour.

I have been informed that there is now water in the tent from their feet. Yay. So I get to sleep in a muddy tent. Oh, well. Its camping, right? What’s camping with out a little mud? At least I don’t need to go out there until dark-time. I’m already having fun, can you tell?

Working with hidden files and directories

I had a problem.  My home directory is huge – 9 gigs – but I don’t know what’s taking up all that room. My porn stash is on another partition where my wife doesn’t know to look, so something is taking up a lot of room and I want to know what and why.

Oh yeah, I know how to check the size of a directory – use du ('du -sh .') for the usage of current directory (including all sub directories).  And, to see the size for every individual directory in the current directory, 'du -sh *'.  Easy peasy.

But that didn’t tell me what I needed to know, since the total size of all visible directories was less than a quarter of the used space.  That’s where hidden directories come into play.

Now, in the unix world, there isn’t a special file permission to hide a file or directory.  You just name it with a leading dot, like '.my_hidden_stuff', and most utilities won’t display it.  There’s nothing intrinsically hidden about it, though.  You can view them easily enough, e.g. 'ls -a' will show everything, including the “hidden” stuff.

What if you want to see just the hidden stuff?  It’s not as simple as saying 'ls -a .*', since that includes '.' (the current directory) and '..' (the parent directory), too.  Some utilities, like du, will then combine arguments with a common root, which means you get the summary for the current directory, but none of the hidden files broken out.

Solution

In bash, at least, you can include simple regular expressions on the command line.  (Remember, in unix, your command line is pre-processed by the shell (bash, csh, tcsh, etc.) and the expanded items are given to the program. DOS/Windows, by contrast, the expansion and processing is the responsibility of the program and command.com (or cmd.exe) does little processing itself.

The regex for all dot files, minus ‘.’ and ‘..’, is '.[^.]*' (which basically says, “start with a dot, and the next character must exist but cannot be a dot, and then anything goes after that”).

So, my command to see how much space each of my hidden directories are using, is

du -shx .[^.]*