InUnix/Linux, afile is a sequence of bytes without structure. Any necessary structure (e.g. for a database) isadded by the programs that manipulate the data in the file. Linuxitself doesn’t know about the internal structure of a database file– all it does is return bytes.
对于Linux系统来说,文件都是无结构的字节序列。所谓任何一个有结构文件(比如数据库文件)都是针对应用程序来讲的,也就是说,linux不会知道文件是什么结构(也不需要知道的),linux只负责返回或者写入文件的字节序列,具体如何解析这个文件是由应用程序负责。
Unix/Linuxtries its best to treat every device attached to it as if it were alist of bytes. Therefore, everything, including network cards, harddrives, partitions, keyboards, printers, and plain files are treatedas file-like objects and each has a name in the file system.
-
Yourcomputer memory is
/dev/mem
. -