From cklo@news.hk.super.net Thu Nov 13 19:04:37 1997 Date: 18 OCT 1997 13:23:25 GMT From: Mr Cheuk Kong Lo Newsgroups: comp.unix.shell, comp.unix.aix, comp.sys.hp.hpux, comp.sys.sgi.admin, comp.sys.sun.admin Subject: Re: Are ther "magic numbers" for Word, Excel files? Are you using latest file-3.22? Try look at it and have: # Popular applications 2080 string Microsoft\ Word\ 6.0\ Document %s # 0 belong 0x31be0000 Microsoft Word Document # 2080 string Microsoft\ Excel\ 5.0\ Worksheet %s # 0 belong 0x00001a00 Lotus 1-2-3 >4 belong 0x00100400 wk3 document >4 belong 0x02100400 wk4 document >4 belong 0x07800100 fm3 or fmb document >4 belong 0x07800000 fm3 or fmb document # 0 belong 0x00000200 Lotus 1-2-3 >4 belong 0x06040600 wk1 document >4 belong 0x06800200 fmt document file-3.22 is available at ftp://ftp.deshaw.com/pub/file Jim Garner (garnerjr@ci.richmond.va.us) wrote: : I want to add entries for Word and Excel files to /etc/magic (my apologies to : OSes that name it differently) so that the 'file' command will recognize those : file types. Both file types appear to begin with the same 8 characters, but I : haven't found a reliable secondary byte sequence to differentiate between the : two. Can anyone provide the pattern for recognizing these and possibly other : MS file types? : Jim Garner : garnerjr@ci.richmond.va.us -- Chris Lo mailto: cklo@hk.super.net System Administrator/Informix DBA mailto: cklo@cklo.hk.super.net The Prudential Assurance (HK) Co. Ltd mailto: paclck@hk.net ============================================================================== -- Linux + FreeBSD + HPUX + Solaris + AIX ============================================================================== #include