在这种情况下,它的感化就像跟在一个 awk 敕令后面的 grep ,只打印匹配行上的第一个单词。
- $ watch -n 5 who
- Every 5.0s: who stinkbug: Wed Aug 23 14:52:15 2017
- shs pts/0 2017-08-23 14:45 (192.168.0.11)
- zoe pts/1 2017-08-23 08:15 (192.168.0.19)
man -k
- $ man -k logrotate
- dh_installlogrotate (1) - install logrotate config files
- logrotate (8) - rotates, compresses, and mails system logs
- logrotate.conf (5) - rotates, compresses, and mails system logs
help
当你完全掉望的时刻,您可能会试图应用此敕令,help 敕廖实际上是显示一个 shell 内置敕令的列表。最令人惊奇的是它有相当多的参数变量。你可能会看到如许的器械,然后开端想知道这些内置功能可认为你做些什么:
- $ help
- GNU bash, version 4.4.7(1)-release (i686-pc-linux-gnu)
- These shell commands are defined internally. Type `help' to see this list.
- Type `help name' to find out more about the function `name'.
- Use `info bash' to find out more about the shell in general.
- Use `man -k' or `info' to find out more about commands not in this list.
- A star (*) next to a name means that the command is disabled.
- job_spec [&] history [-c] [-d offset] [n] or hist>
- (( expression )) if COMMANDS; then COMMANDS; [ elif C>
- . filename [arguments] jobs [-lnprs] [jobspec ...] or jobs >
- : kill [-s sigspec | -n signum | -sigs>
- [ arg... ] let arg [arg ...]
推荐阅读
#MySql-两阶段加锁协定 ##媒介此篇博客主如果讲述MySql(仅限innodb)的两阶段加锁(2PL)协定,而非两阶段提交(2PC)协定,差别如下: 2PL,两阶段加锁协定:重要用于单机事务中的一致性与隔离>>>详细阅读
本文标题:六个优雅的Linux命令行技巧
地址:http://www.17bianji.com/lsqh/37040.html
1/2 1