Re: SSD TBW
[email protected] (Scott Dorsey)
| Newsgroups | comp.misc,sci.electronics.design |
|---|---|
| Organization | Former users of Netcom shell (1989-2000) |
| Message-ID | <[email protected]> |
Don Y <[email protected]> wrote: >On 8/22/2026 8:51 PM, Rich wrote: >> In comp.misc Don Y <[email protected]> wrote: >>> Sadly, UNIX assumes file type is completely indicated by >>> a suffix on a filename -- said suffix being under the control >>> of the person who selected the filename. >> >> Nope. You are mixing up ms windows (where the file extension is >> believed to always be right and descriptive of the contents) with Unix >> (which actually looks at the files contents and pays no attention to >> any part of the name). > >One configures applications (CVS in this case) to use the extension >of the file as an indication of how it should be treated. You can do this, but you can also let it use the magic numbers instead. Which is appropriate depends on your environment. >The contents still don't tell you what the file is or how it is intended >to be used. Because no OS can infer the purpose of a "stream of bytes" >without having been previously informed of that. That's why we have magic numbers. Not every file has a valid magic number but if it doesn't, it will default to "data" type which is the default "I don't know." Use the "file" command on the command line and see how effective it is. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis."