OT? Bash Script

Ed Wilts ewilts at ewilts.org
Thu Sep 1 03:04:18 UTC 2005


On Wed, Aug 31, 2005 at 07:54:18PM -0700, Lokrin wrote:
> Well, I don't even know where to start.  If you can point me to the right 
> command I could probably google more...
> 
> Anyway, I have a directory with several subdirectories in it.  I want to 
> change file names in several ways.
> 
> 1) lower-case everything
> 2) strip out spaces and special characters.
> 3) make jpg, jpeg, jpe, etc.. all into jpg

Check out the rename utility. It used to be bundled as part of the mysql
package but is useful all by itself.

ewilts at pe400 ~]$ rpm -qf /usr/bin/rename
util-linux-2.12a-16.EL4.6

There are a lot of file renaming utilities out there though.  Google is
your friend.
http://www.google.com/search?hl=en&q=linux+file+rename+script&btnG=Google+Search

-- 
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program




More information about the redhat-list mailing list