Difference between revisions of "Ls"
From DevOps Notebook
(Created page with "Linux sort files by size with ls <pre> # ls -S -l # ls -l -S | sort -k 5 -n # sort top 5 largest files in reverse order # ls -l -S -h # sort by size in human readable format...") |
|||
Line 1: | Line 1: | ||
− | Linux sort files by size with ls | + | === Linux sort files by size with ls === |
<pre> | <pre> | ||
# ls -S -l | # ls -S -l |
Revision as of 13:23, 8 October 2020
Linux sort files by size with ls
# ls -S -l # ls -l -S | sort -k 5 -n # sort top 5 largest files in reverse order # ls -l -S -h # sort by size in human readable format # ls -Slhr | grep -v '^d' # exclude directories from sort by size with ls