View previous topic :: View next topic |
Author |
Message |
LL0rd l33t
Joined: 24 May 2004 Posts: 652 Location: Schlundcity
|
Posted: Tue Oct 28, 2008 8:19 pm Post subject: Die größten Ordner |
|
|
Hallo Leute,
kann mir von euch jemand sagen, wie ich die X größten Ordner (die Ordner, die am meisten Speicherplatz belegen) unter einem Pfad finden kann?
Beispiel:
Code: | /home/dr - 10GB
/home/dr/Mails - 1GB
/home/dr/Mails/cur/ - 0,9GB
/home/dr/Mails/new/ - 0,1GB
/home/dr/MP3 - 2GB
/home/dr/MP3/Rammstein - 2GB
/home/dr/Porns - 7GB |
Und so soll etwa die Ausgabe aussehen, nach dem Ausführen von ..... /home/dr/
Code: |
/home/dr/Porns - 7GB
/home/dr/MP3 - 2GB
/home/dr/Mails - 1GB
|
Wie mache ich so etwas? _________________ Alte Mathematiker sterben nicht - sie verlieren nur einige ihrer Funktionen. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9532 Location: beyond the rim
|
Posted: Tue Oct 28, 2008 8:44 pm Post subject: |
|
|
Code: | du -sb /home/dr/* | sort -rn |
wenn die Angabe in Bytes ausreicht. |
|
Back to top |
|
|
Josef.95 Advocate
Joined: 03 Sep 2007 Posts: 4555 Location: Germany
|
Posted: Tue Oct 28, 2008 8:59 pm Post subject: |
|
|
Oder auch
Code: | du -h --max-depth=1 /home/dr/* | sort -rn |
MfG |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9532 Location: beyond the rim
|
Posted: Tue Oct 28, 2008 9:03 pm Post subject: |
|
|
Josef.95 wrote: | Oder auch
Code: | du -h --max-depth=1 /home/dr/* | sort -rn |
MfG |
Funktioniert blos nicht richtig wenn unterschiedliche Grössenordnungen auftauchen (für sort -n sind 100KB > 5GB) |
|
Back to top |
|
|
manuels Advocate
Joined: 22 Nov 2003 Posts: 2146 Location: Europe
|
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9532 Location: beyond the rim
|
Posted: Wed Oct 29, 2008 12:53 pm Post subject: |
|
|
manuels wrote: | dann nimm anstatt dem -h flag das -b flag. dann laufts mit sort |
Du meinst so wie in meinem Beispiel weiter oben? |
|
Back to top |
|
|
Josef.95 Advocate
Joined: 03 Sep 2007 Posts: 4555 Location: Germany
|
Posted: Wed Oct 29, 2008 3:34 pm Post subject: |
|
|
@Genone
Hehe, danke für die Korrektur, es war mein Fehler |
|
Back to top |
|
|
|