Archive for January, 2013

Recover photos and other media from a corrupt disk via command line for free.

Posted on January 25th, 2013 in make life easy, productivity | No Comments »

I lost some photos when my camera jammed on the last day of my vacation. Did a little research and discovered PhotoRec (mac download), a command line utility to recover images and other media off corrupt memory card or disk drives for FREE.

Every other recovery app wants to hijack your data and charge you from $40-80 or more to recover it. Gotta love open source. Kudos to this guy Christophe Grenier who wrote it. (available for all platforms, not just Mac)

Yes Virginia, you do need to defrag your Mac.

Posted on January 24th, 2013 in mac | 12 Comments »

After coming back from vacation I found my Mac unusually slow. Previewing a photo in Finder would cause the OS to beachball for a few seconds before finally showing the photo. It made sorting through all the media (25GB of photos and videos) quite painful.

I tried everything from restarting the OS to clearing ample disk space and nothing seemed to help. 2.2 Ghz of Intel Core I7 processer and 16 GB of ram seemed powerless to a 6MB photo. I started suspecting it was a hard disk problem as seek times seemed to be the major issue.

Researching the topic, it turns out that OS X runs a cron job at 3am for various maintenance task including defragging all files over 20MB. The problem is two fold: I have hundreds of files under 20MB and I always put my computer to sleep when I’m not using it because I actually care about the environment.

From Apple’s official doc:

“If your disks are almost full, and you often modify or create large files (such as editing video, [...]), there’s a chance the disks could be fragmented. In this case, you might benefit from defragmentation, which can be performed with some third-party disk utilities.”

Followed by this gem here: “Another option is to back up your important files, erase the hard disk, then reinstall Mac OS X and your backed up files.”

I went ahead and researched the best defragger for the Mac, iDefrag. (More reviews on it here.)

iDefrag screenshot

I ran the demo first which just reviews your system and then just ended up paying the $30 to buy the software and give it a try.

iDefrag is pretty like most Mac apps and gives you a boatload of useless information. They should strip it all and just have one piece of info after analyzing your system: what percent is it fragmented. This information was probably on one of the analysis pages but I sure couldn’t find it. I set the Mac to reboot and run iDefrag overnight in it’s non-OS mode. I woke up the next morning and my computer is now as fast as the day I bought it with all my photos and videos included this time.

Conclusion: If you constantly increase and decrease the size of your hard drive with lots of little files, do any kind of video editing, and/or don’t regularly leave your machine running all night then get iDefrag. It works.

Resize the root EBS disk on an EC2 instance

Posted on January 16th, 2013 in AWS | No Comments »

Running out of space on your EC2 instance? Here’s a great writeup on resizing the root EBS disk to something beefier. It requires having installing Amazon command line tools through another EC2 instance you have running. Works great.