Rename some files to their own name + something else
I have a directory like Photo
and I want to change the names of the directories inside it -> to what they are, but without it [www.faraDa...] like the first one that I change by mv command
.
but I dont know how remove [www.faraD...] automatically ?
can do this by find ... -exec or mv
in linux command or I need programing like python? to do it.
Update : in ubuntu 20.04 LTS
names are : FVLNX9510
A
toz
[www.FaraD...
They have a difference in the middle part of their name A,B,C,D,...
.
Thank you all !
If the string to change is always the same in all files you could use this command:
rename \[www.website\] '' *
This command works on Fedora 33 actually (I thought it was the same on Ubuntu), however this answer provides an extensive description on how to use rename
on Ubuntu. I think that the command I wrote above should change in something like:
rename 's/\[www\.website\]//' *
Here you can find a description of different rename
packages.