>From 410bfa3cac91bc29c3cf288324e0f77e723de6f1 Mon Sep 17 00:00:00 2001 From: Andreas Metzler Date: Thu, 31 Dec 2015 18:10:19 +0100 Subject: [PATCH 2/2] Add/elaborate on warning about find -size -1M. * find/find.1: Elaborate on warning about find -size -1M. * find.texi: Copy warning about find -size -1M from manpage. --- doc/find.texi | 7 +++++-- find/find.1 | 12 ++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/find.texi b/doc/find.texi index ea5600a..1580b82 100644 --- a/doc/find.texi +++ b/doc/find.texi @@ -1034,8 +1034,11 @@ The number can be prefixed with a `+' or a `-'. A plus sign indicates that the test should succeed if the file uses at least @var{n} units of storage (a common use of this test) and a minus sign indicates that the test should succeed if the file uses less than address@hidden units of storage. There is no `=' prefix, because that's the -default anyway. address@hidden units of storage. Bear in mind that the size is rounded up to +the next unit. Therefore @samp{-size -1M} is not equivalent to address@hidden -1048576c}. The former only matches empty files, the latter +matches files from 1 to 1,048,575 bytes. There is no `=' prefix, because +that's the default anyway. The size does not count indirect blocks, but it does count blocks in sparse files that are not actually allocated. In other words, it's diff --git a/find/find.1 b/find/find.1 index 383ea83..2f2c974 100644 --- a/find/find.1 +++ b/find/find.1 @@ -911,10 +911,14 @@ handle sparse files differently. The `b' suffix always denotes 512-byte blocks and never 1 Kilobyte blocks, which is different to the behaviour of .BR \-ls . -The + and - prefixes signify 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 -.BR "-size -1M" ). +.IP +The + and - prefixes signify greater than and less than, as usual. +Bear in mind that the size is rounded up to the next unit. Therefore +.BR "\-size \-1M" +is not equivalent to +.BR "\-size \-1048576c". +The former only matches empty files, the latter matches files from 1 to +1,048,575 bytes. .IP \-true Always true. -- 2.6.4