Ask Your Question

rename perlexpr not working in Terminal

asked 2015-12-16 14:33:30 -0500

miguel-sensacion gravatar image

I'm new to Fedora 23, and in Linux Mint I would used the terminal to batch rename a ton of pictures and files I have from old hard drives. I have tried to rename files ex: 67_000123.jpg to My_Picture-Col_000123.jpg by using

rename 's/67_(/d{6})/My_Picture-Col_$1/' *

And nothing happens. In Linux mint terminal I would have achieved this. I looked at the bash version and they are almost the same, being that the Fedora Terminal is a revision or two difference.

Can anyone help?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-16 16:35:03 -0500

Hello. Syntax of this commands varies between distros. Check man rename for more info on the usage on your Fedora. For the given example try the following syntax to rename the files:

rename 67_ My_Picture-Col_ *jpg


edit flag offensive delete link more


Thanks you for the reply ! man rename is :

rename [options] expression replacement file...

Thank you since I did not notice that, but How do I get that version on Fedora?! I was so used to the Mint version...

miguel-sensacion gravatar imagemiguel-sensacion ( 2015-12-16 18:14:40 -0500 )edit

Thanks kukack ! I did find some help on the web.

miguel-sensacion gravatar imagemiguel-sensacion ( 2015-12-16 18:26:24 -0500 )edit

Question Tools

1 follower


Asked: 2015-12-16 14:33:30 -0500

Seen: 305 times

Last updated: Dec 16 '15