Are ther "magic numbers" for Word, Excel files?

Are ther "magic numbers" for Word, Excel files?

Post by Jim Garn » Sat, 18 Oct 1997 04:00:00



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

 
 
 

Are ther "magic numbers" for Word, Excel files?

Post by Mr Cheuk Kong » Sun, 19 Oct 1997 04:00:00


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

Quote:>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

Quote:>4      belong  0x06040600      wk1 document
>4      belong  0x06800200      fmt document

file-3.22 is available at ftp://ftp.deshaw.com/pub/file

: 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

--



==============================================================================
-- Linux + FreeBSD + HPUX + Solaris + AIX
==============================================================================
#include <std/disclaimer.h>

 
 
 

1. Definition of "word" in zsh (e.g., "backward-kill-word")

Is it possible to change the definition of a "word" in zsh? I'm used to
the tcsh definition, which excludes characters like "/" as "letters"
in a word. E.g, when I have the following string on the command line

        /usr/local/lib/zdsh

with a typo in the last word, under tcsh I can hit "Meta-Backspace"
and delete just the "zdsh" part. However, under zsh, the default
behavior seems to be to delete the entire string.

Is it possible to change this?

----------------------------------------------------------------------
| Jim Hranicky, Senior SysAdmin                   UF/CISE Department |
| E314E CSE Building                            Phone (904) 392-1499 |

----------------------------------------------------------------------

2. Help to modify the Kernel

3. "file" and "magic" enhancements wanted

4. Vidoe display/Boot problem

5. GETSERVBYNAME()????????????????????"""""""""""""

6. 1 * fwvsvYMlg-Remove network printer

7. functioning file system with "bad super block: magic number wrong"?

8. Wondering about LINUX

9. For Sun PCI as "toy" (excel, word): install win-2000 or XA?

10. Why the "x" in the words "Unix", "Linux"...?

11. syslog() "returns" "bad file number"

12. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

13. "Standard Journaled File System" vs "Large File Enabled Journaled File System"