Deleting files based on their size

I have several files in a folder and I would like to delete the ones that do not contain all the required information (size) let say 1kb.
Any ideas?

If you want to delete files that are less than 1kB, then this should work:

find . -size -2k -exec rm '{}' \;
1 Like

Thanks!

find . -type f -size -1k -exec rm '{}' \;

Did you try your code? :stuck_out_tongue: On my test machine "-1k" finds only empty files.