What's the name(s) of .svg mimetypes?


This have been tedious hunting down the file(s) name of .svg mimetypes. Anyone who can point me in the right direction. It have become hair pilling LOL :wink:


I’m not sure I understand the question but here’s a start. If I were looking for all svg files, I’d use the locate command which is part of the mlocate package. You need to run the updatedb command as root (at least the first time, it’s systemd-automated after that) . Then I would type:

locate -i -r ‘\.svg$’

If you have a particular directory in mind, you could use the find command,

find DIR -iname ‘*.svg’
NOTE: Replace DIR or just change directory and omit.

You could also use the file command

for f in **; do if [[ $(file -b “$f”) == *SVG* ]]; then echo “$f”; else : ; fi; done

See this thread for more ideas.

I’m also not completely sure what you mean.

The most common mime type for an svg is image/svg+xml

You can check out /usr/share/mime/image/svg+xml.xml

Depending on what you want to do you might also want to look at xdg-mime and all the options of this tool.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.