Technology

Replacing file extensions in a Bash for loop

I've had to look this up on the internet several times, so I've finally decided to write an article about it so I'll know where to look next time.

Sometimes I want to do an operation on a large number of files (like scaling a bunch of pictures before uploading to Facebook, for example.) There is a way to use a Bash "for" loop, to have a program iterate over the list of files. However, since I don't want to replace the file, I need to specify a different output filename for the program, something related to the original filename (like filename_small.jpg)

So long Nostromo, you will be missed

Yesterday afternoon, as I was working on some notes, I turned briefly away from my laptop to get a drink. When I returned, there were odd splotches of colour on the screen, and the machine had frozen solid. "No matter," I thought, "it's done this before. I'll just reset it and be on my way.

Compiz and MythTV

Something I've run across since my switch to Compiz on my laptop, which I figured I'd report here so that I can find the answer later on. (and some other reader out there might find it useful too)

Boy, Compiz shore is pretty!

At work I have a 20" LCD which I attach to my laptop, for more screen real-estate. My laptop has an NVidia video chipset, complete with TwinView and dual-head support, but normally I just run the outputs cloned together, and just use the large display when I'm at my desk.

Did you know...

...that GNOME plays nice with LUKS-encrypted portable devices? I sure didn't, until this morning.

(Of course, if you already knew this, then I'm probably not going to tell you anything new, so you can safely skip this article. But hey, you never know, so you might want to read on anyway.)

VirtualBox and Debian Lenny and USB drives and permissions

So, I've been playing with VBox on my laptop, and wanting to access files on a connected USB thumbdrive.

But try as I might, I cannot get the virtual machines to see attached USB devices. Turns out, it's due to a problem of permissions in Debian Lenny. Basically, /proc/bus/usb is mounted in such a way that VirtualBox cannot correctly enumerate the devices.

VirtualBox FTW

Today a coworker pointed out to me Sun's VirtualBox, which is an Open-source virtualization platform (much like VMWare Workstation.) Thus far, I've only installed it on my laptop and installed Windows XP into a VM, but I like it already.

Linux vs the Laptop

The other day I got up close and personal with my kernel configuration, for the first time in many years. I thought to myself, "If I can't use hibernation on my laptop, at least I can eliminate the need for the initrd, so that I can make it boot faster." While I was at it, I reviewed each and every kernel option, building in only what was essential for booting, modularizing anything else I knew I needed, and disabling everything else.

More Fun with the HP tx1000

Well, my success at hibernating my laptop was short-lived. It seems that anything I do causes successful hibernation once or twice, but after that the machine again begins failing in mysterious ways.

I'll say it again: if you want to use Linux, and don't want to have to fight tooth and nail for every inch of functionality, don't buy this laptop. At any price.

Spring Cleaning has begun

Today I spent a little more time cleaning out my home directory on my server. It was like an archaeological dig, unearthing stuff from five or six years ago. Ran across a bunch of old photos, including some of Tigger when he was a kitten; you can find those in The Tigger Gallery.

Syndicate content