How do you find the size of a directory in bash (using ls does not return the size). I am interested in determining which directories have large amounts of
data in them so i can look at freeing up space if they are not important.
du |sort -nrls -lahR |grep -B1 totaldu: fts_read failed: Permission deniedls -laR | sed -n '/^$/{N;N;s/\n//g;s/:total//;p}' | awk '{print $2" "$1}' | sort -gr | head -n 208.0K etc/hal/fdi/policy
8.0K etc/hal/fdi/preprobe
8.0K etc/hal/fdi/information
32K etc/hal/fdi
40K etc/hal
32K etc/pam_pkcs11
200K etc/alternatives
24K etc/default
56K etc/bluetooth
40K etc/X11/fontpath.d
8.0K etc/X11/xinit/Xclients.d
24K etc/X11/xinit/xinitrc.d
72K etc/X11/xinit
16K etc/X11/twm
8.0K etc/X11/applnk
44K etc/X11/xdm
224K etc/X11
24K etc/cron.weekly
8.0K etc/NetworkManager/dispatcher.d
8.0K etc/NetworkManager/VPN
24K etc/NetworkManager
8.0K etc/subversion
28K etc/purple
40K etc/httpd/conf.d
68K etc/httpd/conf
128K etc/httpd
12K etc/acpi/actions
16K etc/acpi/events
36K etc/acpi
168K etc/profile.d
4.0K etc/libpaper.d
5.8M bin
12M boot
84K dev
108M etc

Users browsing this forum: No registered users and 0 guests
dsplabs home ↔
linux blog ↔
linux forums new! ↔
travel photography
©2012 dsplabs.com.au