It works fine if you have multiple devices because you can only run it
against one account and one device at a time.  "ls -i" doesn't span
directory hierarchies or devices.  You do at least have to know what
device the file in question is on, but if you don't know that there's no
tool that will reliably work for you.

-John 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Wjhonson
Sent: Friday, March 16, 2012 3:43 PM
To: [email protected]
Subject: Re: [U2] Turn a device and inode into file name

This only works if you have a single device, since the inode is not
unique cross-device, only unique on a device



-----Original Message-----
From: John Hester <[email protected]>
To: U2 Users List <[email protected]>
Sent: Fri, Mar 16, 2012 3:25 pm
Subject: Re: [U2] Turn a device and inode into file name


I have a utility named FLIST.READU that replaces the inode from the
tandard LIST.READU output with the file name.  It uses "ls -i", so it's
imited to files in the account you run the command from, though.  Works
ine for us because all of our users work out of the same account.  This
s the relevant part of the code:
     INODE.NO = TRIM(READU.ARRAY<I,3>)
    EXECUTE 'SH -c "ls -i | grep ':INODE.NO:'"', OUT > FILENAME
    IF FILENAME<1,1,1> # '' THEN
      FILENAME = FIELD(TRIM(FILENAME<1,1,1>),' ',2) 'L#8'
It's also pretty resource intensive because it re-lists the entire
ccount for every inode.  Probably not much of an issue if your hardware
s fairly new.
-John
-----Original Message-----
rom: [email protected]
mailto:[email protected]] On Behalf Of Wjhonson
ent: Friday, March 16, 2012 12:24 PM
o: [email protected]
ubject: [U2] Turn a device and inode into file name

nyone have an easy way to do this?
n the past I've run a batch routine to just query each and every niverse
file for it's inode and device and build a table of these Every week....
eems like a great amount of overkill to me.
ou could also mod the CREATE-FILE command to sniff it and make an xref
ntry but ....
Any suggestions?
his is NOT for the case where you know the file and want to find the
node and device It's for the case where you know the inode and device
only) and want to find the file.
______________________________________________
2-Users mailing list
[email protected]
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________
2-Users mailing list
[email protected]
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to