文章目录
文件查找
文件查找有3种命令:
- which: 命令查找,查找我们在系统上使用的命令,如
which cat - find:文件查找,针对文件名
- locate:文件查找,依赖数据库
which
which用于查找命令文件。
- which命令的使用方法:
which 需要查找的命令
[root@localhost ~]# which ls
alias ls='ls --color=auto'
/usr/bin/ls
[root@localhost ~]# which mkdir
/usr/bin/mkdir
[root@localhost ~]# which cd
/usr/bin/cd
alias ls='ls --color=auto'表示的是将ls --color=auto简写为ls。
alias命令就是给命令起个别名,方便后续使用。
- 也可以使用where命令进行查找:
whereis 需要查找的命令
[root@localhost ~]# whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1
Linux文件查找与打包压缩技术详解

最低0.47元/天 解锁文章
488

被折叠的 条评论
为什么被折叠?



