Take a number of files named:data_a_LT.fitsdata_a_LT.coodata_a_LT.ecdata_a_LT.grpI want to replace all a_LT with LT_A such that I have:data_LT_A.fitsdata_LT_A.coodata_LT_A.ecdata_LT_A.grpHow does one do this with one command.Something like:mv *a_LT* *LT_A*
Rename a portion of multiple files
linux;rename;mv
If rename is available use this command:rename 's/a_LT/LT_A/' *Another approach with awk:find -type f | awk -F'a_LT' '{printf mv \%s\ \%sLT_A%s\\n, $0, $1, $2}' | bash