Of course, zfs is most likely Solaris 10, and GNU locate is most likely 
Linux. Locate isn't on Solaris by default. However, sunfreeware added a 
findutils package not too long ago that includes locate. Locate has 
advantages and disadvantages. It runs a cron in the middle of the night 
to populate a database with filenames and locations. It is thus faster 
than find, but limited to finding the location of files based on their 
names (as they were yesterday).


---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst 

<[email protected]>

--------------- 

Erdös 4





Richard Chycoski wrote:
> If you use updatedb/locate, my typical first try is to "locate README | 
> grep something-or-other", where something-or-other helps reduce the 
> locate output (if you have at least a tiny inking of the path). If you 
> know the name of another file in the directory - that is more unique 
> than 'README' - then try a 'locate' for that file.
>
> - Richard
>
>
> Edward Ned Harvey wrote:
>   
>> Let’s suppose you rename a file or directory.
>>
>> /tank/widgets/a/rel2049_773.13-4/somefile.txt
>>
>> Becomes
>>
>> /tank/widgets/b/foogoo_release_1.9/README
>>
>> Let’s suppose you are now working on widget B, and you want to look at 
>> the past zfs snapshot of README, but you don’t remember where it came 
>> from. That is, you don’t know the previous name or location where that 
>> file used to be. One way you could do it would be:
>>
>> Look up the inode number of README. (for example, ls -i README)
>>
>> (suppose it’s inode 12345)
>>
>> find /tank/.zfs/snapshot -inum 12345
>>
>> Problem is, the find command will run for a long time.
>>
>> Is there any faster way to find the file name(s) when all you know is 
>> the inode number? (Actually, all you know is all the info that’s in 
>> the present directory, which is not limited to inode number; but, 
>> inode number is the only information that I personally know could be 
>> useful.)
>>
>> ------------------------------------------------------------------------
>>
>>     

_______________________________________________
Tech mailing list
[email protected]
http://lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to