Development Java renameTo return false

Had a issue today where a java function which moves files stopped working. I realised that Java`s io.file.renameTo only throws Exceptions for some scenarios. For some errors, it will only return false when something goes wrong.

Only getting true/false on a rather vital operation is rather silly, so my “fix” was to move over to a library from Apache, aka FileUtils.

So now i simply do this: FileUtils.moveFile(oldFile, newFile);

That function actually throws exceptions when something fails 🙂

Red Hat

Getting snmpwalk on Red Hat 5 (rhel5)

Needed snmpwalk on one of my Red Hat 5 boxes today, yum search snmpwalk gave no clues, but after some digging i found it in the package net-snmp-utils. 🙂

yum install net-snmp-utils