summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Metzler <ametzler@bebt.de>2015-12-31 18:10:19 +0100
committerJames Youngman <jay@gnu.org>2016-01-01 09:43:10 +0000
commit27fd9e050e90b89b13ff696402e018425ddbf2a5 (patch)
treeb4490c1029eadfc1ee7511fe97f4b190988441b3
parent0025eb3c93339b16a880d099aa735c682d733929 (diff)
downloadfindutils-27fd9e050e90b89b13ff696402e018425ddbf2a5.tar.gz
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.
-rw-r--r--doc/find.texi7
-rw-r--r--find/find.112
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
-@var{n} units of storage. There is no `=' prefix, because that's the
-default anyway.
+@var{n} units of storage. Bear in mind that the size is rounded up to
+the next unit. Therefore @samp{-size -1M} is not equivalent to
+@samp{-size -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.