| The Following 7 Users Say Thank You to jedi For This Useful Post: | ||
|
|
06-30-2011
, 07:49 AM
|
|
|
Posts: 4,283 |
Thanked: 2,342 times |
Joined on Jan 2010
@ Australia Mate
|
#2
|
|
|
06-30-2011
, 08:19 AM
|
|
|
Posts: 301 |
Thanked: 192 times |
Joined on Oct 2008
@ England
|
#3
|
|
|
06-30-2011
, 08:20 AM
|
|
|
Posts: 870 |
Thanked: 129 times |
Joined on Aug 2010
|
#4
|
|
|
06-30-2011
, 08:33 AM
|
|
|
Posts: 1,410 |
Thanked: 1,309 times |
Joined on Jan 2010
@ Tatooine
|
#5
|
same as storage usage without the gui
|
|
06-30-2011
, 08:42 AM
|
|
|
Posts: 1,410 |
Thanked: 1,309 times |
Joined on Jan 2010
@ Tatooine
|
#6
|
It's bad script and it's probably stolen, too. You should seek attention somewhere else.
| The Following User Says Thank You to jedi For This Useful Post: | ||
|
|
06-30-2011
, 08:54 AM
|
|
|
Posts: 1,410 |
Thanked: 1,309 times |
Joined on Jan 2010
@ Tatooine
|
#7
|
| The Following User Says Thank You to jedi For This Useful Post: | ||
|
|
06-30-2011
, 09:00 AM
|
|
Posts: 782 |
Thanked: 315 times |
Joined on May 2010
|
#8
|
|
|
06-30-2011
, 09:04 AM
|
|
|
Posts: 301 |
Thanked: 192 times |
Joined on Oct 2008
@ England
|
#9
|
| The Following User Says Thank You to Captwheeto For This Useful Post: | ||
|
|
06-30-2011
, 09:06 AM
|
|
|
Posts: 1,410 |
Thanked: 1,309 times |
Joined on Jan 2010
@ Tatooine
|
#10
|
![]() |
| Tags |
| close this plz, crap code, disk usage, jedi is lonely, troll party |
| Thread Tools | Search this Thread |
|
#!/bin/sh FS1=rootfs FS2=/dev/mmcblk0p2 for PACKAGE in $(dpkg-query -W --showformat='${Package}\n'); do PKGSIZE1=0 PKGSIZE2=0 for FILE in $(dpkg -L "${PACKAGE}"); do if [ -f "${FILE}" ]; then MPOINT=$(df "${FILE}" | tail -n 1 | awk '{print $1}') SIZE=$(du -k "${FILE}" | awk '{print $1}') if [ "$FS1" == "$MPOINT" ]; then PKGSIZE1=$(($PKGSIZE1 + $SIZE)) fi if [ "$FS2" == "$MPOINT" ]; then PKGSIZE2=$(($PKGSIZE2 + $SIZE)) fi fi done echo "$PKGSIZE1 $PKGSIZE2 ${PACKAGE}" doneIt will take a long time to run - for me it's around 40mins to trawl through all the apps I have installed.
Despite the fact this is a crap example of coding, this script may not be used elsewhere without prior permission. Epitaph - I'm looking at you.
May the source be with you.