The option to sort files by size using the ls command is -S (uppercase
S). This sorts files by their size, with the largest files listed first. It is
often combined with -l for long listing format and -h for human-readable
file sizes, like this: ls -lhS. Additionally, you can use the alternative
form --sort=size to achieve the same effect. Summary:
ls -Ssorts files by size.- Combine with
-land-hfor detailed, human-readable output:ls -lhS. - Optionally use
--sort=sizeas an alternative.
This behavior is standard on Linux and Unix-like systems.

