FG
💻 Software

Is there a linux command like mv but with regex?

Fresh5 days ago
Mar 15, 202677019 views
Confidence Score1%
1%

Problem

For example I want to , is there a command that lets me specify renaming patterns?

Error Output

mv (.*?).sql $1.php

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Is there a linux command like mv but with regex?

Low Risk

As others have mentioned, is good at this, but read the man page ( ) before you try it. There are at least two entirely different tools out there called and which one you have will depend on your distribution. Calling them incorrectly can be dangerous. 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…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment