Show the first 20 lines of a log.
head -n 20 app.logShow the first lines of a file; use -n to choose how many.
head [OPTION]... [FILE]...Show the first 20 lines of a log.
head -n 20 app.logInspect the first 64 bytes of a file.
head -c 64 image.bin| Option / clause | Description |
|---|---|
-n, --lines=NUM | Print the first NUM lines (default 10). |
-c, --bytes=NUM | Print the first NUM bytes. |
-q, --quiet | Never print file headers. |
-v, --verbose | Always print file headers. |
-z, --zero-terminated | Treat NUL, rather than newline, as the line delimiter. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.