aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tail.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r--coreutils/tail.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 57ad0f3b7..99f58ddd8 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -6,11 +6,6 @@
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9
10/* BB_AUDIT SUSv3 compliant (need fancy for -c) */
11/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
12/* http://www.opengroup.org/onlinepubs/007904975/utilities/tail.html */
13
14/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) 9/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
15 * 10 *
16 * Pretty much rewritten to fix numerous bugs and reduce realloc() calls. 11 * Pretty much rewritten to fix numerous bugs and reduce realloc() calls.
@@ -23,9 +18,34 @@
23 * 6) no check for lseek error 18 * 6) no check for lseek error
24 * 7) lseek attempted when count==0 even if arg was +0 (from top) 19 * 7) lseek attempted when count==0 even if arg was +0 (from top)
25 */ 20 */
21//config:config TAIL
22//config: bool "tail"
23//config: default y
24//config: help
25//config: tail is used to print the last specified number of lines
26//config: from files.
27//config:
28//config:config FEATURE_FANCY_TAIL
29//config: bool "Enable extra tail options (-q, -s, -v, and -F)"
30//config: default y
31//config: depends on TAIL
32//config: help
33//config: The options (-q, -s, -v and -F) are provided by GNU tail, but
34//config: are not specific in the SUSv3 standard.
35//config:
36//config: -q Never output headers giving file names
37//config: -s SEC Wait SEC seconds between reads with -f
38//config: -v Always output headers giving file names
39//config: -F Same as -f, but keep retrying
40
41//applet:IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
26 42
27//kbuild:lib-$(CONFIG_TAIL) += tail.o 43//kbuild:lib-$(CONFIG_TAIL) += tail.o
28 44
45/* BB_AUDIT SUSv3 compliant (need fancy for -c) */
46/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
47/* http://www.opengroup.org/onlinepubs/007904975/utilities/tail.html */
48
29//usage:#define tail_trivial_usage 49//usage:#define tail_trivial_usage
30//usage: "[OPTIONS] [FILE]..." 50//usage: "[OPTIONS] [FILE]..."
31//usage:#define tail_full_usage "\n\n" 51//usage:#define tail_full_usage "\n\n"