ENOSIG Discussie (threads)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find (bug in size?)
On 03/27/2014 02:32 PM, Wim wrote:
> ...
> Als ik dan doe (10k met min):
> ~/scripts/testjes/findme $ find . -size -10k -printf "%s\n"
> 4096
> En dat is wat anders. Dat lijkt op de omvang van de folder findme zelf.
>
> Nu met 10k zonder -
> ~/scripts/testjes/findme $ find . -size 10k -printf "%s\n"
> 9370
>
> find . -size -30k -printf "%s\n"
> 4096
> 20480
> 9370
>
> Rara, ik snap dat niet, het wordt steeds vreemder lijkt het. Dat ik nu ook
> 4096 te zien krijg is nieuw sinds ik mijn vraag gesteld heb. Nog even
> gecontroleerd in de folder waar ik initieel aan het zoeken was met find en
> daar zie ik nu ook extra 4096 bij de resultaten.
RTFM :-)
> -size n[cwbkMG]
> File uses n units of space, rounding up. The following suffixes
> can be used:
>
> `b' for 512-byte blocks (this is the default if no suffix is
> used)
>
> `c' for bytes
>
> `w' for two-byte words
>
> `k' for Kilobytes (units of 1024 bytes)
>
> `M' for Megabytes (units of 1048576 bytes)
>
> `G' for Gigabytes (units of 1073741824 bytes)
>
> The size does not count indirect blocks, but it does count blocks
> in sparse files that are not actually allocated. Bear in mind
> that the `%k' and `%b' format specifiers of -printf handle sparse
> files differently. The `b' suffix always denotes 512-byte blocks
> and never 1 Kilobyte blocks, which is different to the behaviour
> of -ls. The + and - prefixes signifiy greater than and less than,
> as usual, but bear in mind that the size is rounded up to the next
> unit (so a 1-byte file is not matched by -size -1M).
De opmerkingen over rounding verklaren je resultaten.
Groeten,
-- wytze
Follow-ups:
Gerelateerd:
[
Date Index]
[
Thread Index]