文件查找
3.文件管理 本章同步视频: https://edu.51cto.com/sd/e4874 3.4 文件查找 3.4.1 命令查找 1.which - shows the full path of (shell) commands (1)which 说明 which 命令用于查找并显示给定命令的绝对路径,环境变量 PATH 中保 存了查找命令时需要遍历的目录, which 命令会在环境变量$PATH 设 置的目录里查找符合条件的文件。也就是说,使用 which 命令就可以看 到某个系统指令是否存在,以及执行的命令位置。 (2)which 使用 [root@localhost tmp]# which date #列出找到的第一个结果 /bin/date [root@localhost tmp]# which -a date #列出全部结果 /bin/date /usr/bin/date 3.4.2 文档查找 1.whereis - locate the binary, source, and manual page files for a command [root@localhost tmp]# whereis date date: /usr/bin/date /usr/share/man/man1/date.1.gz /usr/share/man/man1p/date.1p.gz