To get the inode number of a single file, invoke the stat function and reference the st_ino value of the returned struct.
int result;
struct stat s;
result = stat("filename.txt", &s);
if ((result == 0) && (s.st_ino == 199053))
{
// match
}
You could build a solution with the stat function using opendir, readdir, and closedir to recursively scan a directory hierarchy to look for matching inode values.
You could also use scandir to scan an entire directory:
int filter(const struct dirent* entry)
{
return (entry->d_ino == 199053) ? 1 : 0;
}
int main()
{
struct dirent **namelist = NULL;
scandir("/home/selbie", &namelist, filter, NULL);
free(namelist);
return 0;
}