How does the rename command really work?

2 respuestas [Último envío]
GrevenGull
Desconectado/a
se unió: 12/18/2017

According to rename's manual page:

"For example, to rename all files matching "*.bak" to strip the
extension, you might say

rename 's/\e.bak$//' *.bak"

So if I want to rename several files matching "*Unknown*" to replace Unknown with Known it would be like this rename 's/\eUnknown$/Known/' *Unknown* ?

This doesn't seem to work

chaosmonk

I am a member!

I am a translator!

Desconectado/a
se unió: 07/07/2017

You were close. This correct line is

$ rename 's/Unknown/Known/' *Unknown*

GrevenGull
Desconectado/a
se unió: 12/18/2017

Indeed it is. Indeed it is.

I can't grasp how this solution slipped me.

Big thanks man, big thanks!