'tail' now accepts the --debug option, which is currently used to
detail the --follow implementation being used.
+ 'du' now supports the short option -A corresponding to the existing long
+ option --apparent-size, for compatibility with FreeBSD.
+
** Changes in behavior
'timeout' now honors ignored signals and will not propagate them. E.g.,
non-character as a pseudo short option, starting with CHAR_MAX + 1. */
enum
{
- APPARENT_SIZE_OPTION = CHAR_MAX + 1,
- EXCLUDE_OPTION,
+ EXCLUDE_OPTION = CHAR_MAX + 1,
FILES0_FROM_OPTION,
HUMAN_SI_OPTION,
#if GNULIB_FTS_DEBUG
static struct option const long_options[] =
{
{"all", no_argument, nullptr, 'a'},
- {"apparent-size", no_argument, nullptr, APPARENT_SIZE_OPTION},
+ {"apparent-size", no_argument, nullptr, 'A'},
{"block-size", required_argument, nullptr, 'B'},
{"bytes", no_argument, nullptr, 'b'},
{"count-links", no_argument, nullptr, 'l'},
fputs (_("\
-0, --null end each output line with NUL, not newline\n\
-a, --all write counts for all files, not just directories\n\
- --apparent-size print apparent sizes rather than device usage; although\
+ -A, --apparent-size print apparent sizes rather than device usage; although\
\n\
the apparent size is usually smaller, it may be\n\
larger due to holes in ('sparse') files, internal\n\
while (true)
{
int oi = -1;
- int c = getopt_long (argc, argv, "0abd:chHklmst:xB:DLPSX:",
+ int c = getopt_long (argc, argv, "0aAbd:chHklmst:xB:DLPSX:",
long_options, &oi);
if (c == -1)
break;
opt_all = true;
break;
- case APPARENT_SIZE_OPTION:
+ case 'A':
apparent_size = true;
break;
echo foo >d/$f || framework_failure_
done
-du -b d/* >separate || fail=1
-du -b d >together || fail=1
-separate_sum=$($AWK '{sum+=$1}END{print sum}' separate) || framework_failure_
-together_sum=$($AWK '{sum+=$1}END{print sum}' together) || framework_failure_
-test $separate_sum -eq $together_sum || fail=1
+# Check that the following options are equivalent.
+for opts in '-b' '-A -B 1' '--apparent-size --block-size 1'; do
+ du $opts d/* >separate || fail=1
+ du $opts d >together || fail=1
+ separate_sum=$($AWK '{sum+=$1}END{print sum}' separate) || framework_failure_
+ together_sum=$($AWK '{sum+=$1}END{print sum}' together) || framework_failure_
+ test $separate_sum -eq $together_sum || fail=1
+done
Exit $fail