There are many Артикул [какие-то символы].jpg
type files Артикул [какие-то символы].jpg
, so how can I rename them all to [какие-то символы].jpg
with the rename
command?
|
2 answers
if
prename
used as arename
program ( perl implementation, it is more often encountered), then you can rename it like this:$ rename 's/Артикул //' *.jpg
By the way, in this implementation you can add the
-n
option to just see which files will be renamed and how:$ rename -n 's/Артикул //' *.jpg Артикул [какие-то символы].jpg renamed as [какие-то символы].jpg
if the implementation from util-linux is used , it can be done like this:
$ rename 'Артикул ' '' *.jpg
|
Understood. rename -n 's/Артикул\ (.*)\.jpg/$1\.jpg/' *.jpg
|