Find the answer to your Linux question:
Results 1 to 10 of 10
This is on RHEL 4 in case it makes a difference. The directories I am trying to size have a huge number of sub-directories and files and I am finding ...
  1. #1
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301

    Trying to get the size of some directories.

    This is on RHEL 4 in case it makes a difference.

    The directories I am trying to size have a huge number of sub-directories and files and I am finding the using
    Code:
    du -sh /path/to/dir
    is taking a hellishly long time. I am in my early forties and need these figures before I retire. (Not sure if I'm joking)

    Is there a faster way to get the size of a directory?

    Thanks
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  2. #2
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,945
    Just wondering if ya made a type oh with
    du -hs
    and instead you are actually typing in
    du -sh
    which is the only command I know elija for getting directory and sub files size in advance by the way.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  3. #3
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,945
    I wonder if Redhat has a Disk Usage Analyser tool Like they have in Ubuntu? It pulls up Directory Sizes up pretty quick.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  4. #4
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301
    Thanks. Edited original post.
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Posts
    9
    Hi,
    Redhat has a disk usage analyzer tool. U can get that tool by using a command called baobab or Application->System tools-> Disk usage Analyzer

  6. #6
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301
    Is that a graphical tool?

    This has to be done via ssh terminal only and there will tens of thousands of sub directories to process so I imagine it is always going to take a little while.

    I gave up and Ctrl + C'd after 1/2 hour yesterday do you think I was being impatient?
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Exclamation

    Is that a graphical tool?
    yes,elija it's GUI. http://en.wikipedia.org/wiki/Baobab_(software)
    File:Baobab screenshot.png - Wikipedia, the free encyclopedia
    Scanning using command line (du -ksh ) sure to take time....Even above GUI will take some time ....

    What's your disk size ?
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  8. #8
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,393
    Quote Originally Posted by elija View Post
    Is that a graphical tool?

    This has to be done via ssh terminal only and there will tens of thousands of sub directories to process so I imagine it is always going to take a little while.

    I gave up and Ctrl + C'd after 1/2 hour yesterday do you think I was being impatient?
    I think half an hour is a little bit impatient. If you have a huge number of subdirectories then it's going to take time to count the used space.

    Can you get an estimate using 'df'? You might be able to speed it up with the 'nice' command, but it's still going to be limited by the physical i/o speed of the disk.
    Linux user #126863 - see http://linuxcounter.net/

  9. #9
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    Roxoff is correct,using nice is the best option to speed up the operation.
    If you think RAM is small - create a swap or increase swap size ..might be useful for you.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  10. #10
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301
    I'm just trying to get an idea of how backup space we need to buy so I might have to leave it running
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...