Is there any simple way to get a file name knowing its inode value?.
Waiting for ur answers,
> Is there any simple way to get a file name knowing its inode value?.
> Waiting for ur answers,
Integris AG / Vienna
Open Systems Support
This opinion is mine and not necessarily that of my employer.
No guarantees whatsoever.
> > Hi Guys,
> > Is there any simple way to get a file name knowing its inode value?.
> > Waiting for ur answers,
> > karthik.
> Several ways. One is: find . -inum nnnnnn -print
> Helmut Leininger
> Integris AG / Vienna
> Open Systems Support
> This opinion is mine and not necessarily that of my employer.
> No guarantees whatsoever.
"the" full path name? It may have none, or it may have more than one.
In any case, this is an OS question, not a C question. Since from your
mention of inode numbers I assume you're on a UNIX derivative, I'm
crossposting to comp.unix.questions and sending followups there.
If you have access to the underlying medium (eg, raw disk for local
filesystems, raw network for network-remote filesystems), you can in
principle build code that speaks directly to that underlying medium and
figures it out. I wrote such a program for Berkeley FFS filesystems on
local disks, for example. If you have no access beneath the filesystem
level, you'll have to walk the directory tree and hope. (Walking the
directory tree is usually slow, and can miss perfectly valid paths for
permissions reasons - eg, mode 111 directories.)
4. x freeze