You are not logged in.

#1 2019-10-18 03:35:04

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,000
Website

[SOLVED] Fetch all possible mime-types

Hi all,

what would be the best way to list all possible mime-types that could ever appear on my system?

Poking around a filesystem I found out that this covers alot of them, but I'm wondering if that are really all...

cat /usr/share/mime/globs | cut -d':' -f 1 >> mimeapps.list
cat /usr/share/mime/aliases | cut -d' ' -f 1 >> mimeapps.list
cat /usr/share/mime/aliases | cut -d' ' -f 2 >> mimeapps.list
cat /usr/share/mime/types >> mimeapps.list
sort -u -o mimeapps.list mimeapps.list

Last edited by karabaja4 (2019-10-19 00:03:10)

Offline

#2 2019-10-18 08:33:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,728

Re: [SOLVED] Fetch all possible mime-types

You cannot list what has not yet appeared, FWIW the "most common" ones will come from the freedesktop mime database, but that is likely included in your useless uses of cat wink , so look at  /usr/share/mime/packages/freedesktop.org.xml

This is extensible by applications so you will not be able to preemptively list mime types that are only relevant for single applications. FWIW one of these paths will likely contain most of what's currently known on your system

Last edited by V1del (2019-10-18 08:37:02)

Offline

#3 2019-10-19 00:03:50

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,000
Website

Re: [SOLVED] Fetch all possible mime-types

/usr/share/mime/packages/freedesktop.org.xml seems to have a good list, thanks.

Offline

Board footer

Powered by FluxBB