How do I produce sorted list of files in current directory over a certain size?
I have a need to produce a list of files in the current directory which exceed a given size (say, 500k). In addition, the list needs to be sorted by the size of the file from smallest to largest size and not list any file below the given size (again, say 500k). An example of the output I am looking for goes like this:
(SmallFile, which is 499k, would not show up on the report).
I've tried using various combinations of the ls, find, du, and sort commands using the pipe, but I do not get the expected result. Instead, I get things like all files of all sizes (including those below the cutoff) listed in sorted order, or all files greater than the specified size but not in sorted order. I even managed to put together one combination of commands that caused the system to list the same thing over and over non-stop.
Ideally, I can get this task done using a command line entry, as opposed to having to write out a script.
Can someone here help me to solve this problem?