I have this command to find files larger than 2 KB and sort by size:
find . -size +2k -name *.log -printf "%p \t%k kb\n" | ls -lS
but the ls -lS
gives the files that are less than 2 KB also.
How can I display the names and sizes of the files that are larger than 2 KB, sorted by size?