tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: inode open

Adam Burkepile wrote:

> Is there an open function that will open a file based on its inode  
> number instead of a path?

fhopen(2) sort of does that, but you need the original path name
get the file handle in the first place.

> Or equivalently, a function to convert an inode to a path so regular  
> open can open it?

"find <filesystem> -x -inum <number>" is about the easiest way.  Or
maybe fts(3) if you want something in a program (which is what find(1)
uses anyway).


Home | Main Index | Thread Index | Old Index