Simply use something like: ls -lS /path/to/folder/. Capital S. This will sort files by size. Also see: man ls -S sort by file size. If you want to sort in reverse order, just ...
In this article, we will present a number of useful ls command options to list all of the files in a certain directory and sort them by file size in Linux.
Explains how to sort files or directories by size (largest file first) using Linux, *BSD , macOS, or Unix ls command line options.
Sorting Unix 'ls' command output by filesize
How can I display the files in a unix directory sorted by their human readable size , going from largest to smallest? I tried du -h | sort -V -k 1. but it does not seem to ...
Here is how to do using find command: find . -type f -exec ls -al {} \; | sort -k 5 -n | sed 's/ \+/\t/g' | cut -f 9. Here is how to do using recursive ls ...
Reformating file lists using different unix commands.
1 Answer · sort => sort by file size (the 7th column of find output is filesize) · awk = > print the filename full path · dirname => get parent directory of ...
There is an immensely useful tool I use called ncdu that is designed for finding those pesky high disk-usage folders and files, and removing them. It's console ...
By Sandra Henry-Stocker, Unix Dweeb, Network World | Aug 24, 2020 1:40 pm PDT