Oh, And That Reminds Me
Posted Sunday, 07 January 2007, 12:59 am | 1 comment
Nearly a decade ago, I came up with a couple of ideas that wound up staying with me all this time. I still use them to this day.
Nothing but a directory. That’s it. But it brings a bit of order to the harried sysadmin’s life. Need to muck about with /etc/vfstab, one of those files where the slightest little typo can give you quite a blast of the cold sweats?
cp vfstab NOT_IN_SERVICE
Now, that doesn’t seem like brain surgery. And certainly it’s not. But it makes a place where you can keep ‘coordinated’ backups of important files before you muck with them, or move kruft from things you don’t need/use into a place for safekeeping, So they won’t clutter the work environment. By putting it in all-caps, it provides a bit of a clue to someone coming along behind you—say, if you’re hit by a bus—as to where things might be. At minimum, it’ll tweak their curiousity. It’s a little thing, but I’ve found it very, very handy. There’s NOT_IN_SERVICE directories scattered hither and yon on my servers.
And the other idea?
Much like any other admin, I find myself writing many, many, little scripts. It’s part of life, shuffling and manipulating data. And /usr/local/admin/bin is where I keep that ‘toolbag’. It keeps the stuff I’ve written separate from the main tree of applications, so they’re all in one place, easy to refer to, particularly when I forget what I named one of them! Obviously, it’s another path to add to your PATH env, but that’s nothing. Late at night, when I just know I wrote a script that does X, Y, and M, but can’t for the life of me remember what I called it—just cd in there, and I know I’ll spot it in a jiffy. Good luck searching through 300+ commands in /usr/local/bin at 3am.