Extracting the first X lines of a file with Linux

Linux head instruction usage

head-n x file path > The new file name
is here, x stands for the previous x data that you want to intercept, modify
according to needs. For example, if you want to extract 10,000 pieces of data, the instruction is head-n 10000 file path > The new file name
file path is because you need to tell the system where the file is
. If you don’t know, you can use the find /* -name file name to query the location of the file
. The new file generated by> is placed in the same path as the file by default.

Read More: