The lock table spans all accounts.
To list the file associated with any particular lock, you have to span all 
devices, not just a device.
You can't assume that you know the account in which a locked inode resides.

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

If you execute "ls -i" from within UV, it's going to list the files in
he directory where the account you're sitting in resides.  My code
xample isn't written to be able to switch devices because that's of no
se to me in the context of listing locked production files in our
nvironment.  If you want to write a utility that executes "ls -i" on
ny device, that's fairly trivial and there are numerous ways you could
o it.  Just write some code to get the correct path into a variable by
hatever means you prefer and tack it on to the end of the command.
-----Original Message-----
rom:] On Behalf Of Wjhonson
ent: Friday, March 16, 2012 4:47 PM
ubject: Re: [U2] Turn a device and inode into file name

he provided code does not specify a device, so how can you select a
evice  even if you know it?
t doesn't seem to be changing devices....

-----Original Message-----
rom: John Hester <>
o: U2 Users List <>
ent: Fri, Mar 16, 2012 4:41 pm
ubject: Re: [U2] Turn a device and inode into file name

t works fine if you have multiple devices because you can only run it
ainst one account and one device at a time.  "ls -i" doesn't span
rectory hierarchies or devices.  You do at least have to know what
vice the file in question is on, but if you don't know that there's no
ol that will reliably work for you.
----Original Message-----
om:] On Behalf Of Wjhonson
nt: Friday, March 16, 2012 3:43 PM
bject: Re: [U2] Turn a device and inode into file name This only works
f you have a single device, since the inode is not nique cross-device,
nly unique on a device
-----Original Message-----
om: John Hester <>
: U2 Users List <>
nt: Fri, Mar 16, 2012 3:25 pm
bject: Re: [U2] Turn a device and inode into file name
 have a utility named FLIST.READU that replaces the inode from the
ndard LIST.READU output with the file name.  It uses "ls -i", so it's
ited to files in the account you run the command from, though.  Works
e for us because all of our users work out of the same account.  This
he relevant part of the code:
  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'
's also pretty resource intensive because it re-lists the entire count
or every inode.  Probably not much of an issue if your hardware  fairly
---Original Message-----
m:] On Behalf Of Wjhonson
t: Friday, March 16, 2012 12:24 PM
ject: [U2] Turn a device and inode into file name nyone have an easy
ay to do this?
the past I've run a batch routine to just query each and every niverse
le for it's inode and device and build a table of these Every week....
ms like a great amount of overkill to me.
 could also mod the CREATE-FILE command to sniff it and make an xref
ry but ....
y suggestions?
s is NOT for the case where you know the file and want to find the ode
nd device It's for the case where you know the inode and device
ly) and want to find the file.
Users mailing list
Users mailing list
-Users mailing list
-Users mailing list
2-Users mailing list
2-Users mailing list

U2-Users mailing list

Reply via email to