From 520f6ac92a77e8da890df2f40a9a98ddc4010a84 Mon Sep 17 00:00:00 2001 From: Fabian Dellwing Date: Thu, 14 Mar 2024 14:02:15 +0100 Subject: [PATCH] man+tail: Bring the manpage of `tail` up to date --- Base/usr/share/man/man1/tail.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Base/usr/share/man/man1/tail.md b/Base/usr/share/man/man1/tail.md index 4be85cfbba..c16fa842fb 100644 --- a/Base/usr/share/man/man1/tail.md +++ b/Base/usr/share/man/man1/tail.md @@ -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)