markdown Linux shell dictionary.md

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Linux shell dictionary.md相关的知识,希望对你有一定的参考价值。

### Find file path base on filename ###
```
locate -br '^settings.xml$'
```

From man locate:
```
   locate  reads  one or more databases prepared by updatedb(8) and writes
   file names matching at least one of the PATTERNs  to  standard  output,
   one per line.

   -b, --basename
          Match  only  the base name against the specified patterns.  This
          is the opposite of --wholename.
   -r, --regexp REGEXP
          Search for a basic regexp REGEXP.  No PATTERNs  are  allowed  if
          this  option  is used, but this option can be specified multiple
          times.
```
The **^** and **$** ensure that only files whose name is *settings.xml* and not files whose names contain *settings.xml* will be printed.

You may need for the first time to run: `updatedb` (as root) to update/build the database of locate.

### DNS package ###
#### On Ubuntu ####
`apt-get install -y dnsutils`

#### On Centos ####
`apt-get install -y bind-utils`

### man bash ###
#### $! ####
`$!` contains the process ID of the most recently executed background pipeline.

以上是关于markdown Linux shell dictionary.md的主要内容,如果未能解决你的问题,请参考以下文章

markdown Linux shell脚本:set -e和set -x

markdown Dict操纵

markdown Dict操纵

markdown python_dict

markdown Shell特殊变量:Shell 0,#,*,@,?,$和命令行参数

markdown [All About Shell]关于shell的信息#shell #bash #sh