diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-07-27 14:25:28 +0200 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-07-27 14:25:28 +0200 |
commit | 333dc83d52e014a0b532e316ea8cd93b048f1ac6 (patch) | |
tree | 3bf519653280e660e7311e436b6e0e0fee8160a5 /README-release | |
parent | 2bdb74ec1a453f6c6084d042e573de436ec205f3 (diff) | |
download | coreutils-333dc83d52e014a0b532e316ea8cd93b048f1ac6.tar.xz |
du: add --inodes option
This new option can be used to find directories with a huge
amount of files. The GNU find utility has the printf format
"%h" which prints the number of entries in a directory, but
this is non-cumulative and doesn't handle hard links.
* src/du.c (struct duinfo): Add new member for counting inodes.
(duinfo_init): Initialize inodes member with Zero.
(duinfo_set): Set inodes counter to 1.
(duinfo_add): Sum up the 2 given inodes counters.
(opt_inodes): Add new boolean flag to remember if the --inodes
option has been specified.
(INODES_OPTION): Add new enum value to be used ...
(long_options): ... here.
(usage): Add description of the new option.
(print_size): Pass inodes counter or size to print_only_size,
depending on the inodes mode.
(process_file): Adapt threshold handling: with --inodes, print or
elide the entries according to the struct member inodes.
(main): Add a case for accepting the new INODES_OPTION.
Print a warning diagnostic when --inodes is used together with the
option --apparent-size or -b.
Reset the output_block_size to 1 ... and thus ignoring the
options -m and -k.
* tests/du/inodes.sh: Add a new test.
* tests/local.mk (all_tests): Mention it.
* doc/coreutils.texi (du invocation): Document the new option.
* NEWS: Mention the new option.
Diffstat (limited to 'README-release')
0 files changed, 0 insertions, 0 deletions