Linux file view command, file data statistics command

*** Linux file viewing commands: cat, head, tail, less, more, wc ( vim speaks separately) ***

head

Function: View the first n lines of data in a file without specifying the number of lines. The default is 10 lines.
Syntax: head -n file {n is a number}

tail

Function: View the last n lines of data in the file, without specifying the number of lines, the default is 10 lines
Syntax: tail -n file {n is a number}

View file data dynamically : tail -f file

less (recommended, unlike more and cat loaded all at once, less is loaded bit by bit, high efficiency root)

Function: View the file, (auxiliary key: number + Enter, which means how many lines to turn down; space bar, page down, one page; up \ down key, up \ down line)
Grammar: less File
title expansion, key Word Index:
Usage: / Keyword
n: Switch down the keyword
N: shift + n, switch up the keyword

more

Function: view file, (auxiliary key: space bar, page down; b, page up)
Syntax: more file

wc

Function: count the number of data lines (-l), the number of words (w), the number of bytes (c) in the
statistical file Syntax: w-lwc file

Published 21 original articles · liked 0 · visits 580

Guess you like

Origin blog.csdn.net/u014270566/article/details/104257012