From ea1fff2e407b437a7c65f8ce27ba09454cb0f1c4 Mon Sep 17 00:00:00 2001 From: Devin Samarin Date: Wed, 7 Nov 2018 14:57:17 -0800 Subject: [PATCH] find: Include file size conditions (#848) The units of the size command are not straight-forward. The default file size unit is counter-intuitively 512-bit blocks. This patch includes a cheat sheet for the ability to filter files based on its size and the various units that are accepted by the find command. --- find.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/find.md b/find.md index e1870f83b..fd39a5c9b 100644 --- a/find.md +++ b/find.md @@ -33,6 +33,14 @@ find -regex PATTERN ``` +```bash +-size 8 # Exactly 8 512-bit blocks +-size -128c # Smaller than 128 bytes +-size 1440k # Exactly 1440KiB +-size +10M # Larger than 10MiB +-size +2G # Larger than 2GiB +``` + ```bash -newer file.txt -newerm file.txt # modified newer than file.txt