Files / Directories listings

List files by sizes

ls -Srsh *.txt
# -S Sort by size
# -r  Reverse order while sorting
# -s Show size
# -h Show sizes in human readable format

List directories only

ls -d */
# or
ls -l | grep '^d'
# or
ls -p |grep "/"

Show size of all directories under the current directory

du -c | sed -n '/^.*\.\/.*\/.*/!p'
# or
du -h -d 1
# or with du from GNU
du -h --max-depth=1