*I* can assume because in our environment there is one production
account on one device.  I wasn't suggesting that this specific utility
would be of any use in any other environments, only that the underlying
OS-level command could be used in a similar way to translate an inode
into a file name.

-John

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Friday, March 16, 2012 5:14 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Turn a device and inode into file name


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 <jhes...@momtex.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
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.
-John
-----Original Message-----
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Friday, March 16, 2012 4:47 PM
o: u2-users@listserver.u2ug.org
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 <jhes...@momtex.com>
o: U2 Users List <u2-users@listserver.u2ug.org>
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.
John
----Original Message-----
om: u2-users-boun...@listserver.u2ug.org
ailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
nt: Friday, March 16, 2012 3:43 PM
: u2-users@listserver.u2ug.org
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 <jhes...@momtex.com>
: U2 Users List <u2-users@listserver.u2ug.org>
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:
   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'
'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
ew.
ohn
---Original Message-----
m: u2-users-boun...@listserver.u2ug.org
ilto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
t: Friday, March 16, 2012 12:24 PM
 u2-users@listserver.u2ug.org
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
us...@listserver.u2ug.org
p://listserver.u2ug.org/mailman/listinfo/u2-users
____________________________________________
Users mailing list
us...@listserver.u2ug.org
p://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
_____________________________________________
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to