Changing files extention

Pruthvi123

New Member
I have these 400 pictures saved as .FIT and I need to change them into .fit
I have tried the following commands:
rename *.FIT fit field=etn
and
rm 'oldfile'.FIT 'oldfile'.fit

Both don't seem to work for iraf
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
G'day @Pruthvi123 and welcome to linux.org :)

What Distro are you using?

Chris Turner
wizardfromoz
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter

Rob

Administrator
Staff member
also, if they're in dif directories.. you could do something like.. (borrowing the mv portion from above...)

Code:
for file in $(find /path/ -type f -name *.FIT);do mv -- "$file" "${file%.FIT}.fit" ;done
Edit: if using 'rename', I wrote this a while ago, but seems like centos/fedora have one 'rename' while others (ubuntu, etc..) have other flags..
https://www.linuxos.pro/rename-multiple-files-in-linux/
 

Members online


Top