summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-05-03 13:45:26 +0200
committerJim Meyering <jim@meyering.net>2007-05-03 13:45:26 +0200
commit2539b53760dd4efad304e6f5f5e0880b4510d378 (patch)
tree409fd46b349d143c65076800a1db5351816c079c /src/tail.c
parent4e89cf8fb8ccf01ee1d5c351d9fa327a3735007f (diff)
downloadcoreutils-2539b53760dd4efad304e6f5f5e0880b4510d378.tar.xz
The following commands and options now support the standard size
suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y: head -c, head -n, od -j, od -N, od -S, split -b, split -C, tail -c, tail -n. * doc/coreutils.texi (od invocation, head invocation, tail invocation): Document support for new size suffixes. (head invocation, tail invocation): Document that -n uses the same suffixes as -c. (tail invocation): More-clearly document what leading "+" does. * src/head.c (usage, string_to_integer): Support new suffixes. * src/od.c (usage, main): Likewise. * src/split.c (usage, main): Likewise. * src/tail.c (usage, parse_options): Likewise. Prompted by a patch from Evan Hunt.
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tail.c b/src/tail.c
index 210a68178..2e7db0b6a 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -267,7 +267,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
If the first character of N (the number of bytes or lines) is a `+',\n\
print beginning with the Nth item from the start of each file, otherwise,\n\
print the last N items in the file. N may have a multiplier suffix:\n\
-b 512, k 1024, m 1024*1024.\n\
+b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
+GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\
\n\
"), stdout);
fputs (_("\
@@ -1475,7 +1476,7 @@ parse_options (int argc, char **argv,
{
strtol_error s_err;
- s_err = xstrtoumax (optarg, NULL, 10, n_units, "bkm");
+ s_err = xstrtoumax (optarg, NULL, 10, n_units, "bkKmMGTPEZY0");
if (s_err != LONGINT_OK)
{
error (EXIT_FAILURE, 0, "%s: %s", optarg,