The Findutils package contains programs to find files. These
programs are provided to recursively search through a directory
tree and to create, maintain, and search a database (often faster
than the recursive find, but is unreliable if the database has not
been recently updated).
Approximate build time:
0.9 SBU
Required disk space:
55 MB
8.56.1. Installation of Findutils
Prepare Findutils for compilation:
./configure --prefix=/usr --localstatedir=/var/lib/locate
The meaning of the configure options:
-
--localstatedir
-
This option changes the location of the locate database to be in
/var/lib/locate
, which is
FHS-compliant.
Compile the package:
make
To test the results, issue:
chown -Rv tester .
su tester -c "PATH=$PATH make check"
Install the package:
make install
Some of the scripts in the LFS-Bootscripts package depend on
find. As /usr
may not be available during the early stages
of booting, this program needs to be on the root partition. The
updatedb script also
needs to be modified to correct an explicit path:
mv -v /usr/bin/find /bin
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb