Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Die größten Ordner
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
LL0rd
l33t
l33t


Joined: 24 May 2004
Posts: 652
Location: Schlundcity

PostPosted: Tue Oct 28, 2008 8:19 pm    Post subject: Die größten Ordner Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Tue Oct 28, 2008 8:44 pm    Post subject: Reply with quote

Code:
du -sb /home/dr/* | sort -rn

wenn die Angabe in Bytes ausreicht.
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4555
Location: Germany

PostPosted: Tue Oct 28, 2008 8:59 pm    Post subject: Reply with quote

Oder auch
Code:
du -h --max-depth=1 /home/dr/* | sort -rn


MfG
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Tue Oct 28, 2008 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Wed Oct 29, 2008 10:13 am    Post subject: Reply with quote

dann nimm anstatt dem -h flag das -b flag. dann laufts mit sort
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Wed Oct 29, 2008 12:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4555
Location: Germany

PostPosted: Wed Oct 29, 2008 3:34 pm    Post subject: Reply with quote

@Genone

Hehe, danke für die Korrektur, es war mein Fehler :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum