If you use the du command to list all the file sizes on Linux:

1
2
3
du
# or
du -h # Human readable

Then you would have noticed that they are not ordered by file size.

Instead you can pass that result to the sort command as follows:

1
du -h | sort -h