[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding directories with many files in a file system

From: Pádraig Brady
Subject: Re: finding directories with many files in a file system
Date: Fri, 26 Jul 2013 18:56:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 07/26/2013 03:45 PM, Bernhard Voelker wrote:

> address@hidden --inodes
> address@hidden --inodes
> address@hidden inode usage, dereferencing in @command{du}
> +List inode usage information instead of block usage.  An inode (short
> +for index node) contains information about a file such as its owner,
> +permissions, timestamps, and location on the disk.

The above is a bit detailed and may be inaccurate for some (pseudo) file 
I'd tend to not define inode at all here, but if you prefer I'd just say
something generic like that "an inode is used to identify file system objects".

> diff --git a/src/du.c b/src/du.c
> index a6fa16b..d22ca73 100644
> --- a/src/du.c
> +++ b/src/du.c
> @@ -78,6 +78,9 @@ struct duinfo
>    /* Size of files in directory.  */
>    uintmax_t size;
> +  /* Number of inodes in directory.  */
> +  size_t inodes;
> +

uintmax_t (as returned by fsusage)

> +      intmax_t v = opt_inodes ? dui_to_print.inodes : dui_to_print.size;

uintmax_t as the threshold is limited to intmax_t, but size is not.

> diff --git a/tests/du/ b/tests/du/

> +. "${srcdir=.}/tests/"; path_prepend_ ./src
> +print_ver_ du ln mkdir printf rm seq touch

The main util under test is fine to print here

You're free to push with those adjustments.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]