I have a few files in linux:
_foo_1.php
_foo_2.php
_foo_3.php
I want to rename them all from _foo to _bar, preserving the rest of the filename.
I have tried this, but it doesn’t rename anything:
rename 's/_foo/_bar/' *.php
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The syntax you’re using is for Debian rename. Red Hat rename uses a completely different syntax.