Linux 各种命令信息查看指令的区别

对于一些不熟悉的 Linux 命令,肯定需要查看该命令的一些信息,包括命令主要功能(man),命令的shell位置等,查看 shell 位置的几种方法也有很多区别。

一,type 和 which 命令通过 PATH 来查找。

二,whereis 和 locate 命令通过 DB (/etc/updatedb.conf)来查找。

三,find 通过直接扫描磁盘文件来查找。

由于 find 命令扫描磁盘,效率低下,所以尽量不要用 find 命令。而建议使用type, which, whereis, locate。

原文地址:https://www.cnblogs.com/orientsun/p/2582761.html