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 03-26-2007, 02:09 AM   #1
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Rep: Reputation: 15
How to fing the sises of selected set of directories


Is there a command to find the sises of the directories. (only a selected set of directories)
 
Old 03-26-2007, 02:22 AM   #2
ernst
Member
 
Registered: May 2006
Location: Sydney
Distribution: Debian etch, SkoleLinux
Posts: 77

Rep: Reputation: 15
In a terminal window change to the directory you are interested in.
E.g.

cd myData

then type

du -h

to see documentation for du (disk use) type:
man du

If you want to see free space use df -h (disk free)
 
Old 03-26-2007, 02:24 AM   #3
ernst
Member
 
Registered: May 2006
Location: Sydney
Distribution: Debian etch, SkoleLinux
Posts: 77

Rep: Reputation: 15
In KDE Konqueror you can right click on a directory and then select Properties in the pop-up menu.

It will show the size of the whole subtree.
 
Old 03-26-2007, 04:26 AM   #4
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Original Poster
Rep: Reputation: 15
Problem is that when du -h is used entire list of directories keep appearing. how to filter that



Quote:
Originally Posted by ernst
In a terminal window change to the directory you are interested in.
E.g.

cd myData

then type

du -h

to see documentation for du (disk use) type:
man du

If you want to see free space use df -h (disk free)
 
Old 03-26-2007, 04:37 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Use "du" in the directory above the one you are interested in, and use the -s (summary) option so that the contents aren't included. The manpage and "du --help" would have helped you find the answer.
 
Old 03-26-2007, 09:52 AM   #6
henrysukumar
Member
 
Registered: Feb 2007
Location: Bangalore
Distribution: Fedora
Posts: 33

Rep: Reputation: 15
try to grep the directory you want as 'du -h |grep direname'
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic backup program/script for selected directories JonathonReinhart Linux - Software 14 03-10-2006 09:33 PM
cannot fing alsaconfig nor will it run anubis65656 Linux - Software 8 01-31-2006 01:37 PM
How to Recursively Set Permissions for Directories Only edwin11 Linux - Software 4 12-30-2005 09:54 AM
Why can't imlib fing the jpeg header files? Bert Linux From Scratch 6 05-06-2005 05:30 PM
can you set a default umask for only certain directories? BrianK Linux - General 3 06-14-2004 09:02 PM


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