Install the Linux rename utility

Jul 12, '05 09:12:00AM

Contributed by: Helix

After switching from Linux to OS X about a year ago, I was pleased to find all the CLI utilities I used on Linux were in OS X. That is, all except rename. There are various scripts which perform almost the same function, but nothing quite as easy to use. Finally I got fed up and decided to try and build the Linux rename utility for OS X.

The rest of this hint assumes you have a Gnu build environment and know how to use it. The source for rename is contained in the util-linux package. Download util-linux-2.12q.tar.gz, extract it, and switch to the util-linux-2.12q directory.

Run ./configure.

If you attempt to run make on the entire package, it will fail. However, you don't need to build the entire package to build rename. Switch to the misc-utils directory and run make rename. When it's done, copy rename to /usr/bin and rename.1 to /usr/share/man/man1.

Run man rename for usage instructions.

Comments (22)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050630022203488