ITeye博客

Linux:more less tail head cat

2057 · 2014-03-10 17:09 · Linux · 编程语言 · Markdown

more:

Usage: more [options] file...

Options: -d display help instead of ring bell -f count logical, rather than screen lines -l suppress pause after form feed -p suppress scroll, clean screen and disblay text -c suppress scroll, display text and clean line ends -u suppress underlining -s squeeze multiple blank lines into one -NUM specify the number of lines per screenful +NUM display file beginning from line number NUM +/STRING display file beginning from search string match -V output version information and exit

less 比more灵活些,可以trl+f,ctrl+b

head

Usage: head [option]... [file]... Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.

tail

Usage: tail [option]... [file]... Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.

cat

Usage: cat [option]... [file]... Concatenate FILE(s), or standard input, to standard output.

-A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines, overrides -n -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number number all output lines -s, --squeeze-blank suppress repeated empty output lines -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exit

With no FILE, or when FILE is -, read standard input.

Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output

某次面试,某个面试官问,这五个有什么区别?

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。