Originally I was going to use File::Find to locate the files, store the information in a hash, wait a little bit do the same routine again and compare the two hashes for differences. This seemed like to much IO just to see if a file moved from one directory to another.
Enter my next idea. Using the cpan module 'ReadDir' I can get the inode numbers of the files in the directory I am using as my starting place for the sake of monitoring. I now have a list of inode numbers and what I would like to do is be able to find the path of a file with inode number XXXXXXX.
This would keep me from having to do all the IO of locating the file every time. I could swear I saw something like this a few years ago. It was a set of shell utilities. One would give you the inode number of a file (note, not ls -i, it was an actual utility) and the other would tell you the file an inode pointed to.
Unfortunately, I cannot recall what these were. Does anyone recall these two utilities or have another way to quickly get the path of a file from the inode number?
TIA, Chad.
In reply to locate path to a file from inode number by gnu@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |