How do I add/edit file type definitions in Linux? Surely it's possible, Linux must store this information somewhere! We're not Windows users who rely on three letter suffixes to identify everything now are we?
What I want to do is to check a file for a specific header string and then correctly identify that file in the file manager, and of course then open the corresponding application when double clicked. Where in the Linux Mint file system is this file type information located?
Any help would be greatly appreciated, Thanks.
File Type Definitions
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
File Type Definitions
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: File Type Definitions
Linux knows what type a file is with, or without any extension. It will also (in most cases) know which software to use to open a file with, or without any extension.
If you use the icon view mode, the icon itself will tell you the type in many cases.
You can get that information in terminal by using the file command, file /path/to/file_name
"How do I add/edit file type definitions in Linux? Surely it's possible,"
Maybe, but I don't know where.
You can get that information in the file manager by right clicking, then selecting "Properties".
If you use the icon view mode, the icon itself will tell you the type in many cases.
You can get that information in terminal by using the file command, file /path/to/file_name
Code: Select all
file ~/Documents/bike-trick-rider
/home/rick/Documents/bike-trick-rider: ASCII text
Maybe, but I don't know where.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
Re: File Type Definitions
Alternately, you can associate a file with an application by right clicking the file and select "open with" and "open with Other Application" options. After selecting the appropriate application, you can select the "Use as default for this kind of file" check box.
It is surprising the
It is surprising the
file
command would not recognize a file type unless it is totally custom code with a custom magic identity. Does the file
command determine the appropriate file type?🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: File Type Definitions
Yes, the file command does correctly identify the files. However the file browser does not
Re: File Type Definitions
Are you able to associate a file to an application using the previous file browser right click instructions. If not, which file browser are you using, and what is the file type?
Sorry, RichNS I guess we were both replying to original post at the same time. I was slow about committing (dang typos) mine.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: File Type Definitions
I am using the default file browser that comes with MATE, sorry I'm not sure of the exact name.
The files which are giving me the most grief are AHX music modules, which use a THX prefix by default when created in the AHX tracker program on an Amiga. No I am not able to associate an application with them unless I change the prefix to a suffix. The file browser is obviously identifying these files by the filename suffix and not the header.
But also the IFF suffix is used for both ILBM images and 8SVX samples and the default file browser identifies them both as IFF images.
The file command can correctly identify all of these files and more, but the file browser cannot
Re: File Type Definitions
I use XFCE with Thunar, and I do not have access to a MATE machine. You might get a quicker response moving the thread to the MATE Section of the forum. If you do no know how to move the thread ask one of the moderators.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️