作为linux开发,请简述which 和 whereis 区别 ?


which和whereis都是用于在Linux系统中查找文件的命令,但它们的工作方式和使用场景有所不同。 which命令主要用于在PATH环境变量中定义的路径中查找可执行文件。它的主要功能是显示给定命令的路径。当需要确定可执行文件的位置时,which命令非常有用。 whereis命令则更全面,它不仅会在PATH环境变量中查找命令,还会在系统预定义的固定路径中搜索其他文件资源,如命令的手册(man)和源代码等。whereis命令更适合搜索除PATH外的固定目录中的文件。 which命令只会显示最先被找到的命令的路径,而whereis命令则会显示所有相关的文件路径。 来说,which命令主要用于在PATH环境变量中查找可执行文件的位置,而whereis命令则更全面,不仅在PATH中查找,还在系统的固定目录中搜索其他文件资源。 [2023-11-09 18:46:52 | AI写代码神器 | 193点数解答]
相关提问
- 作为linux开发,请简述which 和 whereis 区别 ?(193点数解答 | 2023-11-09 18:46:52)251
- error: cannot uninstall 'greenlet'. it is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.(937点数解答 | 2024-02-29 14:04:25)268
- error: cannot uninstall 'greenlet'. it is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.(435点数解答 | 2024-02-29 14:05:43)239
- scrapy-redis-sentinel 0.7.1 requires redis==3.5.3, but you have redis 4.3.6 which is incompatible. scrapy-redis-sentinel 0.7.1 requires redis-py-cluster==2.1.3, but you have redis-py-cluster 1.3.6 which is incompatible.(245点数解答 | 2024-03-01 14:08:38)265
- 作为javascript开发,简述 jquery中 $ .get()提交和$.post()区别 ?(341点数解答 | 2023-11-09 01:15:01)225
- 作为c++开发,new int[10]跟new int[10]()区别(196点数解答 | 2023-11-09 00:45:31)234
- 作为php开发,php isset() 和 empty() 区别?(340点数解答 | 2023-11-09 17:57:11)231
- 分析一下这段代码: // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 #define attribute in #define varying out #ifdef msaa_fr(260点数解答 | 2024-10-19 19:42:17)219
- 分析一下这段 opengl vertex的代码: // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 #define attribute in #define varying out(191点数解答 | 2024-10-19 19:43:44)203
- 分析一下这段代码(vertex着色器): // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 #define attribute in #define varying out #if(223点数解答 | 2024-10-19 19:50:37)274
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(45点数解答 | 2024-12-14 17:33:30)145
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(356点数解答 | 2024-12-14 17:34:20)179