I want to rename all the files in a folder which starts with 123_xxx.txt to xxx.txt.
123_xxx.txt
xxx.txt
For example, my directory has:
123_xxx
Do it this way:
find . -name '123*.txt' -type f -exec bash -c 'mv "$1" "${1/\/123_//}"' -- {} \;
Advantages: