vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): | 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 'find' would have returned sooner if you had an inkling to search just one filesystem (/u) instead of all of them (/). BTW: '-print' has been totally unecessary for the find command for many years -- it's the default action. -- JP |
| |||
| In article <20040112230102.GM18439@jpradley.jpr.com>, Jean-Pierre Radley <jpr@jpr.com> wrote: >Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): >| 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 > >'find' would have returned sooner if you had an inkling to search just one >filesystem (/u) instead of all of them (/). > >BTW: '-print' has been totally unecessary for the find command for >many years -- it's the default action. Isn't this what ncheck is for? LER > >-- >JP -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 |
| |||
| "Jean-Pierre Radley" <jpr@jpr.com> wrote in message news:20040112230102.GM18439@jpradley.jpr.com... > Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): > | # find / -inum 177094 -print > | /u/appl/filepro/3disp/keygi > > 'find' would have returned sooner if you had an inkling to search just one > filesystem (/u) instead of all of them (/). > > BTW: '-print' has been totally unecessary for the find command for > many years -- it's the default action. Just think of all those times I must have typed, typo'd and corrected that darn old "-print". I can remember, maybe from Xenix days, when I forgot it and got no results. |
| |||
| Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040112230102.GM18439@jpradley.jpr.com>... > Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): > | 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 > > 'find' would have returned sooner if you had an inkling to search just one > filesystem (/u) instead of all of them (/). well, true, and lslk's output did provide that much info, but /u is often a lot larger than ("/" - "/u") > BTW: '-print' has been totally unecessary for the find command for > many years -- it's the default action. just proves I learned on xenix like a real man unlike all these linux weenies |
| |||
| brian@aljex.com (Brian K. White) wrote in message news:<60bd4c6b.0401130407.1015c50e@posting.google. com>... > Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040112230102.GM18439@jpradley.jpr.com>... > > Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): > > | lslk outputs inode numbers for file locks. > > | <snip> > > BTW: '-print' has been totally unecessary for the find command for > > many years -- it's the default action. > > just proves I learned on xenix like a real man unlike all these linux > weenies SCO 3.2v4.2 -print is required. SCO 3.2v5.0.4 -print is NOT required. However saying -print is totally unnecessary is saying my fingers automatically know what flavor or version they are typing on. They have enough trouble with "/" and "\". -print may be unnecessary to later versions of SCO and to Linux, but new rules for my old dogs (make that fingers) is asking a lot. Regards...Dan. |
| ||||
| Dan Skinner <JDanSkinner@jdanskinner.com> wrote: >brian@aljex.com (Brian K. White) wrote in message news:<60bd4c6b.0401130407.1015c50e@posting.google. com>... >> Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040112230102.GM18439@jpradley.jpr.com>... >> > Brian K. White typed (on Mon, Jan 12, 2004 at 01:47:24PM -0800): >> > | lslk outputs inode numbers for file locks. >> > | ><snip> >> > BTW: '-print' has been totally unecessary for the find command for >> > many years -- it's the default action. >> >> just proves I learned on xenix like a real man unlike all these linux >> weenies >SCO 3.2v4.2 -print is required. >SCO 3.2v5.0.4 -print is NOT required. >However saying -print is totally unnecessary is saying my fingers automatically >know what flavor or version they are typing on. They have enough trouble >with "/" and "\". >-print may be unnecessary to later versions of SCO and to Linux, but new >rules for my old dogs (make that fingers) is asking a lot. I'm sure JPR knows this, but let me also point out that saying print is not necessary doesn't really tell the whole story. It is not needed for the simple cases here, but it becomes very necessary in more complex usage. -- tony@aplawrence.com Unix/Linux/Mac OS X resources: http://aplawrence.com Get paid for writing about tech: http://aplawrence.com/publish.html |