Text Viewing

head FILE

# -n 显示文件FILE的前n行


# NAME: output the first part of files

tail

tail FILE

# -n 显示文件FILE的后n行
# -f output appended data as the file grows


# NAME: output the last part of files

cat

cat FILE

# -n number all output lines. 显示行号


# NAME: concatenate files and print on the standard output

tac

tac FILE


# NAME: concatenate and print files in reverse

wc

wc FILE

# -l print the newline counts. 统计行数
# -w print the word counts
# -m print the character counts
# -c print the byte counts
# -L print the length of the longest line


# NAME: print newline, word, and byte counts for each file

Last updated