$
how do I list files by size
Sort files by size, largest first:
ls -lhS | head -20
Or with full paths recursively:
find . -type f -exec ls -lh {} + | sort -k5 -rh
$
ls -lhS | head -20
total 1.2G
-rw-r--r-- 1 user staff 890M Jun 10 11:22 video.mov
-rw-r--r-- 1 user staff 214M Jun 9 08:11 dataset.csv
Documents
Videos
Photos
Backup
Report.pdf
Music
Archive
Projects