Linux Command head command, linux Command head
The head and tail are just as easy to understand as their names. They are used to display a certain number of text blocks at the beginning or end, and the head is used to display the beginning of the file to the standard output, and tail takes it for granted that it is the end of the file.
1. command Format: head [parameter]... [file]... 2. command: The head command is used to display the beginning of the file to the standard output. By default, the head command prints the first 10 lines of the corresponding file. 3. command Parameter:-q hide file name-v display file name-c <byte> display number of bytes-n <number of rows> display number of rows 4. use instance: instance 1: display the first n lines of the file command: head-n 5 log2014.log instance 2: display the first n Bytes of the file command: head-c 20 log2014.log instance 3: command of the file except the last n Bytes: head-c-32 log2014.log instance 4: Command of the output file except the last n lines: head-n-6 log2014.log