I need to tar-gzip files below a certain size in a directory. I tried the command suggested from this post and it works, but when I changed the argument for find -size
to -1G
, it ignores some files even when the file size is below 1GB. When I supplied -100M
and even -900M
those files were not ignored.
Some information about the files:
The files in the directory consists of several medium-sized files (1-200 MB) and thousands of tiny files (<1 MB each).
The medium-sized files are executables (.exe extension).
The tiny files are just some random files with either no extension or .lat extension.
When I supplied -900M
, all the tiny and medium-sized files are returned as the result. However, when I supplied -1G
, all the medium-sized files and many tiny files are missing from the result.
Question:
Is there anything I miss here about the usage of -size -1G
?
Other (possibly useful) info:
I'm running Ubuntu 15.04 as a VM on my Windows 8.1.
If anyone suspects it has something to do with the files I'm working with, please let me know and I will upload the all the files in question.
I'm rather new to Unix/Linux and this is my first question in superuser forum so if I have unintentionally violated any rules please kindly let me know.