LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-03-2006, 04:02 PM   #1
maggus
LQ Newbie
 
Registered: Apr 2006
Distribution: Puppy, Fedora, PCLinux
Posts: 19

Rep: Reputation: 0
directory size?


Probably this is quite obvious, but I can't seam to find the answer using search in phorums.

Question: How can I calculate directory size? In another words I need to know summarized amount of bytes occupied by all files in directory.

Thanks,
Mike
 
Old 12-03-2006, 04:04 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
just use the du command, e.g. du -h /home/bob/
 
Old 12-03-2006, 04:19 PM   #3
maggus
LQ Newbie
 
Registered: Apr 2006
Distribution: Puppy, Fedora, PCLinux
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks

Ok, thanks. I expected it should be something simple like that :-)
 
Old 12-03-2006, 04:34 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
The -s option will print totals for each directory specified on the command line, whereas without this option, you get a line of output for each sub-directory.
 
Old 12-03-2006, 04:45 PM   #5
maggus
LQ Newbie
 
Registered: Apr 2006
Distribution: Puppy, Fedora, PCLinux
Posts: 19

Original Poster
Rep: Reputation: 0
Yes, I have figured that out already.
Thanks
 
  


Reply

Tags
directory, size


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to know the size of a directory? kornerr Linux - General 4 06-30-2005 09:59 AM
getting the directory size in c rajesh_b Programming 7 01-06-2005 06:41 AM
directory size chandan Linux - General 3 06-26-2003 08:51 AM
directory size santoshgnag Linux - General 1 06-26-2003 04:00 AM
Directory size Steave Linux - General 4 09-03-2001 04:13 AM


All times are GMT -5. The time now is 08:13 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