1

I have several files in the same folder that have one element in common in the names. How do I rename the files so that the common element in the names is deleted?

Example

marked as duplicate by wjandrea, Byte Commander, Jacob Vlijm, pomsky, karel Apr 13 '18 at 22:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Use one of the text listing commands and copy/paste the text to your question. This will make it easier for us to text the text against the commands provided. you can get a text listing with commands such as ls or better ls -1. – L. D. James Apr 13 '18 at 20:35
  • 1
    If you google "ubuntu bulk rename", you'll find many other related questions. – wjandrea Apr 13 '18 at 21:06
0

The way I always do it: Thunar bulk rename.

Install Thunar:

sudo apt install thunar

Now open bulk rename (if you're using basic 16.04 version, just go to dash home and type bulk: you'll get it.)

Options are pretty obvious from there.

I know, I know, some geek will tell me I should have done it from the command line. And that's doable too, but you'd need to be a bit more specific on exactly what you want to get a specific command.

0

You could use rename

rename -n 's/\(U\)//' *.bin

This will delete the "(U)" part of the file name from all .bin files.

If you are happy with changes that rename will make then take out the "-n" option which is No Action, that only shows what files would have been renamed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.