Please show us the ls -la output for the file that has size 89 bytes. That find command shouldn't show you anything for files smaller than 512000 bytes. Unless you have a huge directory, it shouldn't make any difference, but please also try:
Is the output you showed us from your original script, or from my suggested modification? I'm not clear as to whether or not the "neat output" my suggestion provided solved your problem???
It isn't a problem; I just wanted to be sure your problem had been fixed. I'm glad my suggestion worked.
The size reported by the lstat() system call for a directory varies depending on filesystem type. Some file systems report the number of files contained in the directory; some report the space needed to hold the i-node numbers and the names of the files contained in the directory; some report the accumulated sizes of the files contained in the directory (which I would guess is what happened in your case); and some report other values. Furthermore, when a file is unlinked from a directory, the size of the directory might or might not shrink. By adding the -d option to ls , the output reported just the directories larger than the size you specified instead of those directories AND the contents of those directories.
Sorry. The 512000 was a typo. It should have been 5120000. If you look at the find man page's description of the size primary, you'll see that the size specified is the number of 512 byte blocks; not the number of bytes. If you want files with sizes larger than 10,000 bytes (instead of larger than 10,000 512-byte blocks), use -size 10000c .
The change from -exec ls -lad {} \; (which causes find to invoke ls for each file found meeting your size limits) to -exec ls -lad + (which causes find to invoke ls with as many arguments as it can without overflowing ARG_MAX limits) just makes your script run a little faster (or, if there are a lot of files meeting your size limits, a lot faster).
The 1st operand to find is the name of a file (usually of type directory) to be tested or operated on by the primaries specified by later operands. The diagnostic you got is saying that find was not able to find the file named 104857600 that you specified as a starting point for a list of files to be processed.
One would think that if you were looking for files larger than 500Mb, you would either want -size +524288000c (500*10241024 bytes) or -size +1024000 (500*10241024/512 512-byte blocks). Using -size +104857600c would be looking for files larger than 100Mb instead of 500Mb.