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?
Asked
Active
Viewed 1,908 times
1
2 Answers
1
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.

stumblebee
- 3,547
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.

anonymous2
- 4,298
ls
or betterls -1
. – L. D. James Apr 13 '18 at 20:35