That works great!
I need to use this in a Perl script, where I store the ls -iR output in a file and parse that file. If the line contains a directory, store it in a variable. If its a file name and inode, and if the inode is the same as some predefined value, then I need to use the inode and the dir_name. I have the code below, and obviously it doesnt work. Any idea why?
Thanks!
system "ls -iR > temp_inodes_fnames";
open(INO_FNAME, "temp_inodes_fnames") || die "File doesnt exist!";
open(FNAMES, ">>temp_filenames") || die "File doesnt exist!" ;
while($record = <INO_FNAME>){
I need to know the complete path (directory and the filename) to those files whose inodes match a given set of values. Hence if the inodes match a value defined in a hashtable, I need the name of the file as well as the directory to which it belongs and store it in a file. I then read these files at a later stage in the script.
I havent the complete code as the other parts are irrelevant, hence the confusion, sorry about that! :o