diff options
author | Christoph Mende <angelos@unkreativ.org> | 2011-05-06 20:22:15 +0200 |
---|---|---|
committer | Christoph Mende <angelos@unkreativ.org> | 2011-05-06 20:22:15 +0200 |
commit | 0500eaa203e255a71cb55e6332bf8d6e6eb3a166 (patch) | |
tree | e08e3af698dda40932521701718d12b98f127e56 /filesdir-usage.sh | |
parent | add a simple script to show usage of FILESDIRs in the tree (diff) | |
download | qa-scripts-0500eaa203e255a71cb55e6332bf8d6e6eb3a166.tar.gz qa-scripts-0500eaa203e255a71cb55e6332bf8d6e6eb3a166.tar.bz2 qa-scripts-0500eaa203e255a71cb55e6332bf8d6e6eb3a166.zip |
Minor improvements to filesdur-usage.sh
Use pushd/popd instead of cd.
Don't rely on portdir being in /usr/portage
Diffstat (limited to 'filesdir-usage.sh')
-rwxr-xr-x | filesdir-usage.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/filesdir-usage.sh b/filesdir-usage.sh index 4677277..920b5af 100755 --- a/filesdir-usage.sh +++ b/filesdir-usage.sh @@ -3,11 +3,12 @@ # $1 is a number, N. The top N directories that are consuming space. Defaults to # all. -cd /usr/portage/ +pushd $(portageq portdir) >/dev/null if [[ -z $1 ]]; then du -h */*/files | sort -nr else du -h */*/files | sort -nr | head -n $1 fi +popd >/dev/null echo echo $(emerge --info | grep Timestamp) |