I
I
ILoveYAnny2016-06-13 17:41:35
linux
ILoveYAnny, 2016-06-13 17:41:35

How to bulk remove multiple characters from names in Ubuntu?

Hello, I ran into such a problem, I can not remove the character set from the names in the folder. I tried 3-4 programs, different commands - rename, mv, etc. Can't find a suitable solution
rename "s/\'//" *
Removes only one quote, in one iteration. Also, when you add characters, for example, to remove - and the _ command stops working:
rename "s/\'_-//" *
A suitable solution for me, a program or command in which I can list the characters, and when executed, it will remove ALL matches.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nathanael, 2016-06-13
@ILoveYAnny

Removes all characters from the filename that match the pattern:
Removes all characters from the filename that match one of the given characters in the pattern (variants are separated by a vertical bar "|" and specified inside parentheses):
The "g" modifier causes the interpreter to keep looking for matches after the first found to the end of the line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question