-S option . listing directory contents sorted by file size

GNU command

$ls -l -Gg
total 124
-rwxr-xr-x 1 54161 Dec 12 18:32 bp
-rw-r--r-- 1  8917 Sep 22  2006 cfg.c
-rw-r--r-- 1  1638 Sep 22  2006 cfg.h
drwxr-xr-x 2  4096 Oct 26 17:43 CVS
drwxr-xr-x 3  4096 Oct 26 00:48 gtk
-rw-r--r-- 1   104 Oct 26 00:49 Makefile
-rw-r--r-- 1   718 Dec 12 18:33 sample.cfg
-rw-r--r-- 1 32385 Oct 26 17:43 simpleproxy.c


$ls -l -Gg -S 

total 124
-rwxr-xr-x 1 54161 Dec 12 18:32 bp
-rw-r--r-- 1 32385 Oct 26 17:43 simpleproxy.c
-rw-r--r-- 1  8917 Sep 22  2006 cfg.c
drwxr-xr-x 2  4096 Oct 26 17:43 CVS
drwxr-xr-x 3  4096 Oct 26 00:48 gtk
-rw-r--r-- 1  1638 Sep 22  2006 cfg.h
-rw-r--r-- 1   718 Dec 12 18:33 sample.cfg
-rw-r--r-- 1   104 Oct 26 00:49 Makefile
$


GNU related Explanation

-S     sort by file size

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s