I got a copy of The Unix Programming Environment by Kernighan and Pike from a garage sale. I'm very interested in the chapter about the UNIX filesystem. Naturally, I also found this passage very interesting:
The time has come to look at the bytes in a directory:
$ od -cb . 0000000 4 ; . \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 064 073 056 000 000 000 000 000 000 000 000 000 000 000 000 000 ....
It was really long so I won't type the whole thing out. The gist of it was that it displayed the directory in the way it was stored on the system. I quickly rushed to my laptop (Debian) to try this out. I typed out the command as it was in the book.
$ od -cb .
od: .: read error: Is a directory
0000000
Obviously it won't let me view the raw contents of the directory. So here's my question.
Does the Linux kernel store directories in a different way that the original UNIX kernel did? If not, why is there the need to conceal the actual bytes of the directory from the user?