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