Dave's Brain

Browse - Computer Tips - My root partition is nearly full how can I tell what's taking up the root?

Date: 2008sep27
OS: Linux
Language: bash

Q.  My root partition is nearly full how can I tell what's taking up the root?
If I do "du /" I get things that are not in the root partition

A.  I use this small script (called root_du) to filter out directories that
are not in the root partition:

#!/bin/sh DISK=`df / | tail -1 | awk '{print $1}'` for I in /*; do if df $I | grep -q $DISK; then du -sh $I fi done

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.