View Single Post

   
  #1 (permalink)  
Old 02-15-2008, 11:43 AM
Brian K. White
 
Posts: n/a
Default find a filename by it's inode number

lslk outputs inode numbers for file locks.

Is there a faster way than this find command to find out the filename
associated with the inode numbers?
In the following session, lslk returns immediately, but find takes 20
seconds or so before in prints that filename, and then continues to
run for an unknown time longer scanning the rest of the disk(s). (I
hit delete after another 30 seconds)

# lslk |grep 177094
rclerk 3972 1,43 177094 1280448 w 0 1022596 0 0 1022599
/dev/u (/u)
dclerk 8704 1,43 177094 1280448 w 0 1013704 0 0 1013707
/dev/u (/u)
dclerk 12712 1,43 177094 1280448 w 0 422386 0 0 422389
/dev/u (/u)
dclerk 22161 1,43 177094 1280448 w 0 391264 0 0 391267
/dev/u (/u)
dclerk 23056 1,43 177094 1280448 w 0 822526 0 0 822529
/dev/u (/u)
dclerk 24197 1,43 177094 1280448 w 0 57814 0 0 57817
/dev/u (/u)
dclerk 26499 1,43 177094 1280448 w 0 791404 0 0 791407
/dev/u (/u)
rclerk 27410 1,43 177094 1280448 w 0 1240450 0 0 1240453
/dev/u (/u)
# find / -inum 177094 -print
/u/appl/filepro/3disp/keygi
#

thanks
Reply With Quote