# 使用 find 命令查找文件
# 语法: find [路径] [表达式]
# 示例: 在 /home 目录下查找所有 .txt 文件
find /home -name "*.txt"
# 使用 locate 命令查找文件
# 语法: locate [选项] 文件名
# 示例: 查找所有名为 example.txt 的文件
locate example.txt
# 使用 whereis 命令查找文件
# 语法: whereis [选项] 文件名
# 示例: 查找名为 vim 的程序的位置
whereis vim
# 使用 which 命令查找可执行文件
# 语法: which [选项] 文件名
# 示例: 查找名为 python3 的可执行文件的位置
which python3
-name 选项用于指定文件名模式。find 快,但可能不是最新的结果。需要定期更新数据库(使用 updatedb 命令)。上一篇:linux中查找文件的命令
下一篇:linux挂载iso
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站