Max Eskin wrote:
How do UNIX files work? Is there a header of some sort?
BTW, I think it's an incredible pain that the Mac has no built in
way to change file types. If they get lost, I have to used DiskEdit
or some such thing to restore them.
Nope, Unix files are just files. The "file" command to sniff out the
file type looks at the beginning of the file for key signatures that
might indicate what the file is and mistakes are made and accepted if
a shell script is mistaken for a C program. The file /etc/magic is a
fine resource on old Unix systems, I don't always remember where the
lookup table is kept lately, with Linux it's in /usr/lib/magic but
despite several years of recent AIX administration I realize I've
never looked it up in that OS.
>One of my latest
three-great-ideas-before-breakfast ideas is
>to write a program for Windows that sniffs and identifies files
>in the manner of Unix's "file". That's the problem with files as
>files: you can easily lose track of what's in them, especially
>if you lose that three-char extension, or it gets wrapped in
>an archive format or attachment, etc.
>
>- John
>Jefferson Computer Museum <http://www.threedee.com/jcm>
--
Ward Griffiths
They say that politics makes strange bedfellows.
Of course, the main reason they cuddle up is to screw somebody else.
Michael Flynn, _Rogue Star_