man+tail: Bring the manpage of tail
up to date
This commit is contained in:
parent
e511c553a8
commit
520f6ac92a
Notes:
sideshowbarker
2024-07-17 01:28:15 +09:00
Author: https://github.com/fdellwing Commit: https://github.com/SerenityOS/serenity/commit/520f6ac92a Pull-request: https://github.com/SerenityOS/serenity/pull/23584 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kemzeb
1 changed files with 13 additions and 2 deletions
|
@ -15,7 +15,8 @@ $ tail [-f] [-n number] [file]
|
|||
## Options
|
||||
|
||||
* `-f`, `--follow`: Output data as it is written to the file
|
||||
* `-n number`, `--lines number`: Print the specified number of lines
|
||||
* `-n [+]NUM`, `--lines [+]NUM`: output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM
|
||||
* `-c [+]NUM`, `--bytes [+]NUM`: output the last NUM bytes; or use -n +NUM to output starting with byte NUM
|
||||
|
||||
## Arguments
|
||||
|
||||
|
@ -30,7 +31,7 @@ $ tail README.md
|
|||
|
||||
Print the last 42 lines of todo.txt:
|
||||
```sh
|
||||
$ tail -n42 todo.txt
|
||||
$ tail -n 42 todo.txt
|
||||
```
|
||||
|
||||
Print the last lines as they are written to logs.log:
|
||||
|
@ -38,6 +39,16 @@ Print the last lines as they are written to logs.log:
|
|||
$ tail -f logs.log
|
||||
```
|
||||
|
||||
Print everything but the first line of foobar.csv
|
||||
```sh
|
||||
$ tail -n +2 foobar.csv
|
||||
```
|
||||
|
||||
Print the last 1337 bytes of leet.txt
|
||||
```sh
|
||||
$ tail -c 1337 leet.txt
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [`head`(1)](help://man/1/head)
|
||||
|
|
Loading…
Add table
Reference in a new issue