7 ms·
Of course, for the given question you can simply do: rename oldname newname * or, for other unix-like systems/flavors rename "s/oldname/newname/" old
by RiderOfGiraffes 17y ago
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.*
- billswift 17y agoThanks, 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.
- RiderOfGiraffes 17y agoI'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.