 | | The simplest object in the filesystem is a regular file. This object can contain whatever data the user chooses to place there; the operating system does not interpret it in any way. Unlike some other operating systems, which have several different types of files such as sequential, random access, fixed-length records, and so on, UNIX does not impose any format on a regular file at all. Instead, the file is simply interpreted as a string of bytes, and these bytes may be read and written in any way the user chooses. Certain programs, of course, expect this string of bytes to have a specific format. For example, the assembler generates an object file that must be in a particular format (header, followed by executable code, followed by initialized data) to be understood by the linker. But these formats are imposed by user-level programs, not the operating system. As far as UNIX is concerned, there is no difference whatsoever between a program's source code, its object code, its input, and its output. They're all just regular files, each of which contains a string of bytes. | |
|