LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-16-2007, 03:49 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
cmdline: howto know size of folder (recursive) ?


mit commandline

Thanks
 
Old 07-16-2007, 03:59 PM   #2
dbogdan
Member
 
Registered: Feb 2005
Location: Metro Detroit, US
Distribution: Suse/Slackware/Mepis
Posts: 174

Rep: Reputation: 31
Give this a shot..

du -h
 
Old 07-16-2007, 04:12 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Code:
$ du -hs <directory>
...will print a recursive total of the contents of <directory>
 
1 members found this post helpful.
Old 07-16-2007, 04:24 PM   #4
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 57
Code:
du -s -c Folder
Code:
21183380        School/
means 21 GB

du -hs School
Quote:
21G School/

Last edited by frenchn00b; 07-16-2007 at 04:30 PM.
 
1 members found this post helpful.
Old 07-16-2007, 04:27 PM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 57
Even Better :
type this
Code:
 clear;   for each in $(ls) ; do du -hs "$each" ; done
and it ll show all the size of your folders

this works too:
Quote:
# for each in bin etc initrd lost+found proc sbin sys usr boot lib opt root srv tmp var ; do du -hs "$each" ; done
method2:
frontend kde
Quote:
apt-get install kdirstat

Last edited by frenchn00b; 08-04-2007 at 07:35 AM.
 
Old 07-16-2007, 08:49 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Quote:
Originally Posted by Xeratul
mit commandline

Thanks
Code:
tree -sd

Cheers,
Tink
 
Old 07-16-2007, 10:22 PM   #7
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Quote:
Originally Posted by frenchn00b
Code:
 clear;   for each in $(ls) ; do du -hs "$each" ; done
and it ll show all the size of your folders
You mean as in
Code:
du -sh *
?

 
Old 07-18-2007, 01:04 PM   #8
dbogdan
Member
 
Registered: Feb 2005
Location: Metro Detroit, US
Distribution: Suse/Slackware/Mepis
Posts: 174

Rep: Reputation: 31
THIS is exactly why I like linux.... choices...

du -h

du -hs <directory>

du -s -c Folder

clear; for each in $(ls) ; do du -hs "$each" ; done

for each in bin etc initrd lost+found proc sbin sys usr boot lib opt root srv tmp var ; do du -hs "$each" ; done

tree -sd
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partitions - how to find current size from cmdline yogaboy Linux - General 3 01-09-2007 02:39 AM
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 03:09 PM
Bash Programming, Recursive/Iterative Calls on Folder Contents gtwilliams Linux - Newbie 1 07-06-2005 07:44 PM
Folder size xedios Linux - Software 1 07-05-2004 05:40 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 03:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration