Skip to content
Advertisement

Linux rename with a variable character?

I have a list of files eg.

JavaScript

How do I use rename to be like this:

JavaScript

I am new to this and having trouble understanding the examples online. I want to do something like the following where the ? is a variable character:

JavaScript

Advertisement

Answer

? mean “any character”.

So, your page-1.htm will be rename because it’s match with pattern page-?.htm but page-32.htm don’t

for your problem, you can use find | replace method, like this:

JavaScript

I know it’s doesn’t what you really want, but it’s temp solution

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement