[techtalk] Re: od
Laurel Fan
lf25+ at andrew.cmu.edu
Wed Mar 15 14:54:26 EST 2000
List seems to have lost its [flags]...
Excerpts from linuxchix: 15-Mar-100 od by Phil Savoie at learnix.ca
> I have a question with regards to od. In Solaris, the command "od -c ."
> will give ascii representation to the file names that are held by the
> directory. In RH6.1 this same command does not work the same way.
Probably because linux doesn't let you read() a directory. Actually,
it's technically ext2fs that does that. Some other filesystems, like afs,
on Solaris, also do that.
> I have
> to use the following "od -c *" which after reading the man page, gives
> information about the *contents* of the file. Is there a similar command
> in RH6.1, that when given, will display actual filenames in ascii that are
> held in the directory?
Um, ls? ;)
If that's too easy, you could strace ls and see how it gets its
information.
> The reason I'm asking is that I realize that the inode table does not
> carry information about the filename but the directory in which file
> is written to does. I just want verify this.
Try looking at the getdents syscall, or the relevant kernel code?
More information about the Techtalk
mailing list