MS-DOS executable (COM) file is actually chinese email

#>file mytest.txt

mytest.txt: DOS executable (COM)

reported a chinese email message as a DOS executable file

Workaround:

Comment out the line in /usr/share/file/magic

#0      byte            0xe9            DOS executable (COM)
#>0x1FE leshort         0xAA55          \b, boot code
#>6     string          SFX\ of\ LHarc  (%s)

and then rebuild it

#> rm /usr/share/file/magic.mgc

#> cd /usr/share/file/

#> file -C magic

Test it again.

#> file mytest.txt

mytest.txt: UTF-8 Unicode mail text
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=214718

Leave a Reply