linux 文件查找,which,whereis,locate,find

2023-05-30,,

linux 文件查找,which,whereis,locate,find

一:which

主要用于查找可执行命令的所在位置;

如图,查找命令 ls的目录;

二:whereis

主要用于查找命令的帮助文件,二进制,源文件等;

比如,查找命令 ls

三:locate

基于linux自己数据库的文件快速查找;

查找速度快;

新增加的文件可能立刻,查询不到,此时要手动更新linux数据库

sudo updatedb

比如:查找新建立文件 hi.txt

四:find

基于linux文件系统的查找,速度没有locate快

比如:在当前目录下,查找 hi.txt

参考:http://edu.51cto.com/lesson/id-19493.html

linux 文件查找,which,whereis,locate,find的相关教程结束。

《linux 文件查找,which,whereis,locate,find.doc》

下载本文的Word格式文档,以方便收藏与打印。