The unix file command uses a “magic” file database to determine which type of data a file contains, independently of the file’s name or extension.
I need to craft my custom magic database for testing purposes, but I fail to find how to create one.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can
man magicfor a description for how to create your own magic file. Then usefile -C -m <your magic file>to compile it, andfile -m <your magic file>to use it.