One of the best command to rename all the files having same extensions. This is one line command. Say you have 100 files with same extension jpg and you want to convert all the jpg files to gif files so here is the below command to do it.
ls -d *.jpg | sed -e 's/.*/mv & &/' -e 's/jpg$/gif/' | sh
you just need to replace jpg instead of the extension you have and replace gif value with what extension you want to replace.
Hope this might be definitely helpful for you.
No comments:
Post a Comment