December 29, 2006

Quotes for the Day

This morning:
"There have never in history been so many opportunities to do so many things that aren't worth doing."
William Gaddis

This afternoon:
"You can't build a reputation on what you are going to do"

Henry Ford

Posted by TheIdeaMan at 03:25 PM | Comments (1) | TrackBack

December 28, 2006

Rename files recursively in Linux/Unix

While one would think that the 'rename' command would have a recursive option, it (for some reason, I hope is good) does not.

So, rather than typing...
rename -r *.php *.php4
One must type...
find . | sed 's/\(.*\)\.php/mv \1.php \1.php4/'|sh
which works beautiful, thought it's one of the uglier command line statements I've seen.

Special thanks to Brad Garrett for the majority of the line. I added the '.' after 'find'. :)

Posted by TheIdeaMan at 03:57 PM | Comments (3) | TrackBack