Traverse your filesystem's directories recursively, doing stat
(or probably lstat
) on each file, comparing st_ino
member of struct stat
to the inode number you're searching.
If you didn't have to do it in C, I would recommend find /fs/root -inum N
instead.