For example I want to mv (.*?).sql $1.php,
is there a command that lets me specify renaming patterns?
|
|
For example I want to is there a command that lets me specify renaming patterns? |
|||
|
|
migrated from stackoverflow.com |
|
|
|
As others have mentioned, Here's the man page for the perl-based version by Larry Wall that ships with Ubuntu. You give it a perl expression like Here's the man page for the rename that ships with older Red Hat and CentOS distributions. Usage is simple string substitution like You could also use a bash one-liner to process each file one at a time:
|
||
|
|
|
|
There's
There's also |
||
|
|
|
|
||
|
|
|
|
Yes - it is called rename. |
||
|
|
|
|
G'day, You could also try entering
Or to make it use regex's change it slightly to
for a bit of shell coding fun. (-: |
||
|
|
|
|
You could use a combination with find, grep and xargs |
||
|