zoukankan      html  css  js  c++  java
  • 命令与文件的查询

    脚本文件名(命令)的查询:

      外部命令(非bash所提供的命令)的查询:#which name  (which默认情况下是查找PATH内所规范的目录)

      内置在bash中的命令的查询:#type name

    文件名的查找:

      通常是先使用whereis或者是locate来查找,如果真的找不到了,才以find来查找。因为whereis与locate是利用数据库来查找,相当快速;而find要查询硬盘,速度慢。

      如果要使搜索到的结果更加准确,可以先手动更新数据库,手动更新数据库命令:#updatedb

      #whereis  [-bmsu]  文件名或目录名

      #locate  [-ir]  keyword        (keyword是文件的部分名称)

      #find  [PATH]  [option]  [action]

    关键字搜索命令:apropos 列出与关键字相关的命令或函数等(apropos命令与man命令的k选项类似,都是从man手册中查找关键字)

      #apropos  关键字      (此处的关键字可以是命令名的一部分或者是某个功能的含义)

      例如:

      #apropos process

      [root@www etc]# apropos process      会列出所有与进程(process)相关的命令函数,很实用
              abort                (3p)  - generate an abnormal process abort
              acct                 (2)  - switch process accounting on or off
              accton               (8)  - turns process accounting on or off
              AF_LOCAL [unix]      (7)  - Sockets for local interprocess communication
              AF_UNIX [unix]       (7)  - Sockets for local interprocess communication
              Apache2::Process     (3pm)  - Perl API for Apache process record

              ......
              _exit                (2)  - terminate the current process
              exit                 (3)  - cause normal process termination
              exit                 (3p)  - terminate a process
              _Exit [_exit]        (2)  - terminate the current process
              _exit [exit]         (3p)  - terminate a process
              _Exit [exit]         (3p)  - terminate a process
              exit_group           (2)  - exit all threads in a process
              fc                   (1p)  - process the command history list
              fork                 (2)  - create a child process
              fork                 (3p)  - create a new process
              ......

  • 相关阅读:
    再也不用为word 中表达式的上标和下标发愁了
    创建链接
    ps钢笔工具隐藏的知识。
    学Ps个人遇到的小细节
    新手琢磨ps,学问深着呢。。
    数据库2012终于知道数据库攻击注入参数
    想脱离鼠标,不想要鼠标就只想用键盘完成所有编程,你说可能吗?
    vs2013中的快捷键
    如何在C/C++中动态分配二维数组【转载】
    转载:C++的那些事:表达式与语句
  • 原文地址:https://www.cnblogs.com/nufangrensheng/p/3426438.html
Copyright © 2011-2022 走看看