[OpenAFS] AFS aware 'find' command

Wolfgang FRIEBEL Wolfgang.Friebel@cern.ch
Fri, 12 Apr 2002 08:36:44 +0200 (CEST)


On Thu, 11 Apr 2002, Vladimir Kondratiev wrote:

> Matthew A. Bacchi wrote:
> 
> >I've heard rumors of such a thing way back in the AFS collective
> >memory, but does anyone know of, or have a copy of an AFS aware
> >version of the 'find' command?  It was described to me as having
> >knowledge of volume boundaries, and therefore not attempting to
> >traverse beyond such a boundary during invocation.  Any help would be
> >appreciated.
> >
> >Thanks,
> >-Matt
> >
> You will be surprised, but standard GNU find (findutils RPM for RedHat, 
> or ftp://ftp.gnu.org/gnu/findutils/ )
> do support AFS. Look at sources, they have AFS aware macros for autoconf 
> and corresponded parts in the code. I, however, had troubles compiling 
> it with AFS support since it looks for libraries with names different 
> from those used in openAFS.
> 

Unfortunately that is not enough. The AFS support in GNU find is very 
limited. To my knowledge findutils 4.1.7 can detect whether you are in AFS 
space or not and that can be used to delimit searches. What you probably 
like to have is the ability to detect volume boundaries.

Sometime ago I did patch findutils:
        * find/find.c and find/parser.c: introduce new option -xvol
          for AFS file systems. Analogous to -xdev (stay_on_filesystem)
          -xvol means stay_on_volume i.e. do not descend into directories
          located on different AFS volumes.

This patched version is still available at
ftp://ftp.ifh.de/pub/unix/gnu/findutils-4.1.enhanced.tar.gz
The patches did not work any longer with recent versions of findutils, and 
I did not have time to redo the changes.

I know of other people who simply wrote a wrapper script around find that 
does the volume boundary handling separately.

Wolfgang Friebel