Created
December 13, 2022 18:09
-
-
Save stwobe/6368cfc9b79758daedaea2d3003326aa to your computer and use it in GitHub Desktop.
Add .jpeg extenstion to files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f \ | |
-not -name "*.*" \ | |
| while read FILE; \ | |
do if [ $(file --mime-type -b "$FILE") \ | |
== "image/jpeg" ]; \ | |
then mv "$FILE" "$FILE".jpg; fi; done; | |
# link | |
https://www.baeldung.com/linux/bash-add-file-extension |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment