unix file structure (or lack of same)

0257014-Robert White140 rwhite at nusdecs.uucp
Tue Nov 6 11:29:14 AEST 1990


In article <125379 at linus.mitre.org> duncant at mbunix.mitre.org (Thomson) writes:
>I understand that, on unix, the file system is designed so that a file always
>looks like a sequence of bytes, with no record structure at all.
>Is this correct?

You are correct.

> [How do you do dbms and "records" question here]

counting "records" starting from zero you fseek() to
	(record_num * record_size)

and then you get the data by reading record_size bytes all at once.


In general fact (excepting some IBM systems and the like) this is
what every "record oriented" operating system does for you every
time.  Putting the record-type-info in the programs that use the
data is "arguably better" because 'most' filing constructs do not
need the overhead (in sorage and wasted processing) associated
with record-oriented storage.

e.g. of the following filing constructs

Text File
Flat File
Program Executable
Library File
Archive File
Directory
DBMS Data File
Index File (arguably trival of above)

only the last three are really(tm) fixed-length/known-variable-length
record structured files.

Rob.



More information about the Comp.unix.questions mailing list