find locate which whereis grep 命令

命令名称: find 

  317  find /etc  -name  iniy
  318  find /etc -name servi*
  319  find /etc -name init???
  320  find /etc -iname init???
  321  find / -size +204800 #1个数据快是512 字节 是0.5k
  322  find /home -user test
  323  find /etc/ -cmin -5
  324  find /etc/ -cmin -30
  325  find /etc/ -size +163840 -a -size -204800
  326  find /etc -name init* -a -type f
  327  find /etc -name init* -o -type f
[root@localhost tmp]# find . -inum 1

命令名称:locate

 获得文件路径

在文件资料库找查找,并不是进行硬盘查找,/tmp 目录下updatedb也无法查找

[root@localhost ~]# locate *init
/bin/redhat_lsb_init
/etc/rc.sysinit
/etc/X11/xinit
/etc/pam.d/run_init
/etc/rc.d/rc.sysinit
/etc/security/namespace.init
/etc/sysconfig/init
/sbin/capiinit
/sbin/init
/sbin/telinit
/usr/bin/msginit
/usr/bin/xinit
/usr/kerberos/bin/kinit
/usr/kerberos/bin/krb524init
/usr/sbin/capiinit
/usr/sbin/run_init
/usr/share/doc/pam-0.99.6.2/txts/README.pam_keyinit
/usr/share/doc/rp-pppoe-3.5/adsl-init
/usr/share/logwatch/scripts/services/init
/usr/share/system-config-netboot/diskless/diskless.init
[root@localhost ~]# touch byf
[root@localhost ~]# locate byf
[root@localhost ~]# find byf
byf
[root@localhost ~]# updatedb 
[root@localhost ~]# locate byf
/root/byf
[root@localhost ~]# locate -i BYF
/root/byf
[root@localhost ~]# 


命令名称:which、whereis

得到命令存放在那个文件,针对命令

[root@localhost ~]# which cp
alias cp='cp -i'
        /bin/cp
[root@localhost ~]# which adduser
/usr/sbin/adduser
[root@localhost ~]# 


命令名称: grep

查找文件内容,也就是关键字

 

  352  grep -i  multi* /etc/inittab
  353  grep -v *a*  /etc/inittab
  357  grep -v ^# /etc/inittab



  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值