认识
官网:https://www.gnu.org/software/findutils/
文档:https://www.gnu.org/software/findutils/manual/find.html
仓库:https://savannah.gnu.org/git/?group=findutils
The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. These programs are typically used in conjunction with other programs to provide modular and powerful directory search and file locating capabilities to other commands.
组成
安装的命令列表
Findutils,包含了一系列用于查找文件的程序。这些程序可以递归搜索目录树并创建、维护、搜索数据库(通常比递归查找更快,但数据库要记得更新)。
code | Was formerly used to produce locate databases; it is the ancestor of frcode
find | 在指定的目录树中搜索满足条件的文件。
locate | Searches through a database of file names and reports the names that contain a given string or match a given pattern
oldfind | Older version of find, using a different algorithm
updatedb | Updates the locate database; it scans the entire file system (including other file systems that are currently mounted, unless told not to) and puts every file name it finds into the database
xargs | 从标准输入中读取数据,然后构建命令来执行。
性质
WIP
构建
在 GNU/Linux 下,编译安装 Findutils 包
针对源码编译,参考 LFS/6.53. Findutils-4.6.0: http://www.linuxfromscratch.org/lfs/view/7.10/chapter06/findutils.html
在 maxOS 下,编译安装 Findutils 包
./configure –prefix=/gnu –localstatedir=/gnu/var/lib/locate
make
make install