#!/bin/sh #\- pipe a du listing through tac and ind #usage: %dutree [directory] #pretty formatting of directory tree output from "du -kx [$*]" #sizes of files are given in parentheses, as number of 1024-byte blocks #[disk space is apportioned in 4k blocks] #mount points are not traversed #symlinks are not followed # #BUG in dusort [which otherwise would do nicely as formatter] #if two or more directories with same path have same size, then #their subdirectories will be sorted together and printed as a block #after the directories are printed as a block. du -kx $* | tac | ind #du $1 | dusort -t