News for hackers. Stuff that matters.
Re:Adventures in Shell Scripting by RiderOfGiraffes on Sunday August 23, 2009 @03:34PM (#780872)
Of course, for the given question you can simply do:

    rename oldname newname *
or, for other unix-like systems/flavors

    rename "s/oldname/newname/" oldname.*
Re:Adventures in Shell Scripting by billswift on Sunday August 23, 2009 @08:41PM (#781278)
Thanks, I've been using Linux for 13 years now and didn't even know the rename command existed; I was taught to use mv to rename files.
Re:Adventures in Shell Scripting by RiderOfGiraffes on Monday August 24, 2009 @03:46AM (#781714)
I've been using Unix/Linux for nearly 20 years, and I stumbled across the "rename" command about 5 years ago when I was regularly using 5 different operating systems. I typed "rename" and wondered why it didn't do what I expected. I had intended "mv".

Don't confuse them. I used the difference to learn more precisely what happens in a filing system when you do a "mv" as compared with a "rename". It was interesting.

I've since forgotten most of the details, but it occasionally proves useful.