is with a simple utility that I call "lc". (Also, should you ever need such
a thing, creating a complementary "uc" would be an obvious modification.)
#!/usr/bin/perl -w
# Created by Ben Okopnik on Fri Jul 25 09:13:22 EDT 2003
die "Usage: ", $0 =~ /([^\/]+)$/, " <FILE[S]_TO_LOWERCASE>\n" unless @ARGV;
rename $_, lc for @ARGV
Note that you can specify multiple files or even shell wildcards at the
command line; it's perfectly happy to chew on whatever you supply.
____________________________________________________
measuring the temperature in your computer room
Wed, 17 Mar 2004 13:12:23 -0800
Yan-Fa Li ([58]yanfali from best.com)
Hi,
I've found a useful side effect of running smartd on my drives at home which
I've used for a while now to monitor the temperature in my apartment. A lot
of newer IDE drives, especially IBM/Hitachi's and SCSI hard disks monitor
the drive temperature. I've found this to be a useful way to figure out how
hot it is in my computer room at home :D
Assuming you've already installed smartmontools, this was tested with
version 5.26:
# smartctl -a /dev/hda | grep 194
194 Temperature_Celsius 0x0002 161 161 000 Old_age
Always - 34 (Lifetime Min/Max 20/37)
As you can see the drive is a toasty 34 degrees celsius. Of about 5-7
degrees above ambient, it's about 27-29C or 80-85F in that room right now.
Not great for the equipment but survivable. Anyway, not terribly useful, but
interesting nonetheless :D
Yan
____________________________________________________
Troubleshooting mail delivery
Thu, 1 Apr 2004 22:33:59 -0500
Ben Okopnik ([59]LG Technical Editor)
There are times when the mail just won't go through, for any of a host of
reasons. Your ISP's server may be down, your own mail programs don't work,
whatever - and of course, this happens at the most critical times, "when it
absolutely, positively has to be there." Well, assuming that your
recipient's mail server is working, you can bypass most of the chain - at
least your end of it. This can also be a good testing tool. It lacks a few
refinements (e.g., there's no subject and the address you supply is actually
used as the normally hidden "From" header rather than the friendlier and
visible "From:"), but it will at least get the content across.
ben@Fenrir:~/Docs$ telnet badabing.com 25
Trying badabing.com...
Connected to badabing.com.
Escape character is '^]'.
220 badabing.com ESMTP Postfix (Debian/GNU)
HELO myserver.net
250 badabing.com
MAIL FROM: me@myserver.net
250 Ok
RCPT TO: joe@badabing.com
250 Ok
DATA
354 End data with .
Hi, Joe - it's me!
.
250 Ok: queued as D1F8F160B4
QUIT
To recap - I connected to port 25 (SMTP) at badabing.com, identified my
server via HELO ("hello"), to which the server responded with its own name.
I then told it who the MAIL was FROM: and who the recipient (RCPT) is
supposed to be, and asked it to stand by for the actual DATA, which it told
me to end with a return, a period, and a return. When I was done, I typed
"QUIT" to exit.
This is not for everyday use, but can be a very handy tool for those times
when you've just got to get your mail across despite problems.
____________________________________________________
vmlinuz from when and where?
Wed, 31 Mar 2004 01:45:38 -0800
Heather Stern ([60]The Answer Gang's Editor Gal)
In my consulting I find myself running into an awful lot of systems booting
off of 'vmlinuz' in the root directory. What kernel is that? How the heck
would I know?
I'll tell you how I ask it :D
[root@somebox] /# strings vmlinuz | grep 200
=6= |