How to use mv command to rename multiple files in unix?

command, mv, rename, unix

Solution

Don't know if mv can directly work using * but this would work

find ./ -name "*.xyz\[*\]" | while read line
do 
mv "$line" ${line%.*}.xyz
done

Problem

I am trying to rename multiple files with extension `xyz[n]` to extension `xyz` example : ``` mv *.xyz[1] to *.xyz ``` but the error is coming as - `" *.xyz No such file or directory"`

Original source

Related problems