Archive
Posts from 2011
Undeleting a file that resides on a Linux EXT3 or EXT4 file system
I have on a couple of occasions been asked to restore files that were deleted. I've been fortunate up to this point that I have always been able to get the deleted file back, either through file system manipulation, dd'ing of a device or by restoring the file from a previous back up. One thing I've never quite understood is why UNIX and Linux Operating Systems don't ship with a undelete utility for each file system type. Assuming you don't zero out the metadata and the data blocks haven't been re-used, restoring a file is pretty straight forward…
$ read more →My quest for the perfect cup of coffee
Like most techies, I love to enjoy a couple cups of coffee each day. I'm not an espresso person like my blogging partner Mike, but am a simple drip guy. For the past 3 - 4 years I've been using a Cuisineart 12-cup drip coffee maker with natural unbleached filters. I THOUGHT this would provide a good cup of joe, but oh how wrong I was…
$ read more →Running an SSH client inside your Firefox web browser
I recently came across FireSSH, which is an SSH client that runs inside Firefox. The FireSSH plug-in allows you to create an SSH connection to a remote host using just a web browser, and I can see all kinds of uses for this! The plug-in is written entirely in javascript, and uses a couple of features that require Firefox 4 (Firefox 4 rocks, so upgrading to it should be a no brainer). To access the plug-in, you will first need to surf over to the mozilla plug-in site and install it using your choice of installation options…
$ read more →Configuring NSCD to cache DNS host lookups
I haven't really spent that much time configuring nscd, so I thought I would take a crack at it this morning while sipping my cup of joe. Looking at one of my production hosts, I queried for the "host" cache statistics. This is the nscd cache which keeps DNS lookups. With the nscd daemon running, you can query the size / performance of the caches with the -g flag…
$ read more →Continuing to tail a file after it's been rotated
I use xtail and tail quite a bit to debug problems. Sometimes when I'm up late at night troubleshooting issues, the log rotation jobs will kick off and my tail session will stop updating (tail will follow the file descriptor associated with the file by default, not the name of the file). Since this can make debugging an issue a bit confusing, I've made it a habit to alias tail to something like this: The "--follow=name" option will cause tail to follow the name of the file and not the file descriptor, and the "--retry" option will cause tail to try to re-open the file if it's not accessible (log rotation events will cause the file to change). It's become second nature to run tailer now, and I don't get that "WTF?!?" moment at 2am now…
$ read more →