Linux下还有一个非常好的命令,就是man。使用man [command]来查看这个command命令的发行文档。这是一个非常好的学习办法。可以使用man来查看命令的介绍、功能及各项参数的用法。
查看pwd的发行文档:
man pwd PWD(1) User Commands PWD(1) NAME pwd - print name of current/working directory SYNOPSIS pwd [OPTION]... DESCRIPTION Print the full filename of the current working directory. -L, --logical use PWD from environment, even if it contains symlinks -P, --physical avoid all symlinks --help display this help and exit --version output version information and exit
查看wc命令的发行文档:
man wc WC(1) User Commands WC(1) NAME wc - print newline, word, and byte counts for each file SYNOPSIS wc [OPTION]... [FILE]... wc [OPTION]... --files0-from=F DESCRIPTION Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read standard input. A word is a non-zero-length sequence of charac‐ ters delimited by white space. The options below may be used to select which counts are printed, always in the following order: new‐ line, word, character, byte, maximum line length. -c, --bytes print the byte counts -m, --chars print the character counts
查看grep的发行文档:
man grep GREP(1) General Commands Manual GREP(1) NAME grep, egrep, fgrep - print lines matching a pattern SYNOPSIS grep [OPTIONS] PATTERN [FILE...] grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...] DESCRIPTION grep searches the named input FILEs for lines containing a match to the given PATTERN. If no files are specified, or if the file “-” is given, grep searches standard input. By default, grep prints the matching lines. In addition, the variant programs egrep and fgrep are the same as grep -E and grep -F, respectively. These variants are deprecated, but are provided for backward compatibility. OPTIONS Generic Program Information --help Output a usage message and exit. -V, --version Output the version number of grep and exit. Matcher Selection -E, --extended-regexp Interpret PATTERN as an extended regular expression (ERE, see below). -F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. -G, --basic-regexp Interpret PATTERN as a basic regular expression (BRE, see below). This is the default. -P, --perl-regexp Interpret PATTERN as a Perl regular expression. This is highly experimental and grep -P may warn of unimplemented features.
Copyright © 2015-2023 问渠网 辽ICP备15013245号