Hi Friends
I tried to find the file type of a file on my linux machine by using the following command
file xy.txt
instead of getting the file type i got following message
file: couldnot found any magic files!
What is wrong on this
how can i find the file type?
Regards
Shekar
Let's get into something deep, how this file program is working. Every file has got some information of it's type into few starting bytes. Those bytes are known as magic numbers. Your file program will look into this number and try to resolve the file type. You can see the same by using 'od'.
Now as far as your porblem is concern may be there is a file which stores the information about this magic numbers and that file seems to be removed from your system. ( I am not very sure about this, as most of the implemetations of file have this info in the source code).
regards
Apoorva Kumar
check whether the magic file is available under
/usr/lib/locale/LC_MESSAGES/LC_MESSAGES/
as
a magic file as /usr/lib/locale/locale/LC_MESSAGES/magic
or under /etc/magic
else try to execute the file command as
file -m <magicfile_location> <filename>
try using either of the files