LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-23-2001, 10:14 AM   #1
adenardo
Member
 
Registered: Oct 2001
Location: Fort Collins, Colorado
Distribution: RHEL3/FedoraCore3
Posts: 61

Rep: Reputation: 15
directory size


how can I tell the size of a directory, including all files, but not subdirs? I would prefer not to ls -ls and add all the sizes. is there a command that will provide usage information (similar to what df provides for filesystems) for individual directories?

then..how can I determine the size of a directory including all files and subdirectory contents (recursively)?

if df tells me that /tmp is 80% consumed and I find it to contain 6 subdirectories, it would be helpful to be able to determine the size of each subdirectory, individually. thanks in advance.
 
Old 10-23-2001, 01:34 PM   #2
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
for a directory with subdirecories use

du -hs <directory>

if you also want to see the sizes of all files and the summaries for all subdirectories use

du -h <directory>

Don't know how to just tell the size of all file in one dir. Steave.
 
  


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
How to know the size of a directory? kornerr Linux - General 4 06-30-2005 09:59 AM
Directory size Carl-Fredrik Linux - Software 1 10-25-2004 03:28 PM
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 Helixx Linux - General 1 04-27-2001 08:49 PM

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

All times are GMT -5. The time now is 04:34 AM.

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