Thanks, Guys :-). Regards, Karthik. On Mon, 21 Feb 2005 12:14:38 +0100, Erik Mouw <J.A.K.Mouw@xxxxxxxxxxxxxx> wrote: > On Sun, Feb 20, 2005 at 03:25:03PM +0530, Karthik Subramanian wrote: > > I was dusting my old copy of Kernighan & Pike, and I remembered > > working out most of the examples on an antiquated unix machine in > > engineering school. I decided to try out some just for kicks, and I > > discovered something: > > > > In page 51 of K&P, there's an example that runs od on a directory, and > > the dump actually shows the filenames. I tried doing that (running 'od > > .' ) on my linux box, and got this instead: > > > > od: .: Is a directory > > 0000000 > > > > So why doesn't od work on directories? Could somebody shed some light > > on this, please! > > od doesn't open(2) the file with the O_DIRECTORY flag, see "man 2 open" > for an explanation. > > Erik > > -- > Erik Mouw > J.A.K.Mouw@xxxxxxxxxxxxxx mouw@xxxxxxxxxxxx > > > -- There are things known and things unknown, in between lie the Doors -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/