Kamran Agayev's Oracle Blog

Oracle Certified Master

Finding the folder that consumes more space in Linux OS

Posted by Kamran Agayev A. on January 23rd, 2012

Sometimes we got some folders filled with unknown files either due to any bug where Oracle creates 100 files in a second :) or due to the OS bugs. And in some cases we’re not able to find in which folder files were created. For that, you can use the simplest command in Linux to get the output for the folders with its size sorted. Here’s the command:

[php]du -s /u01/* | sort -n -r

…….

28G     /u01/oracle/product/10.2.0/db_1/flash_recovery_area

……..[/php]

 

From the output you will get the folder which consumes more space

4 Responses to “Finding the folder that consumes more space in Linux OS”

  1. abdul Says:

    thanks,
    could you tel me is it possible to we can recover dropped tablespace using rman ? if yes !then how?
    i am waiting for your rply mr. kamran

  2. Laurnet Schneider Says:

    I would always use -k with du
    du -ks /u01/* | sort -rn
    so that it would bring consistent result over os. You will never get human readable sizes (as 28G in your post), as sort does not know that 28G is bigger than 56K

    du -ks brings you kilobytes. du -s brings you blocks, kilobytes in linux and 512b blocks in solaris/aix.

    but obviously if you always use Linux, it will be the same (but it may change one day)
    Cheers
    Laurent

  3. Chinar Says:

    “abdul Says:
    January 23rd, 2012 at 6:34 am

    thanks,
    could you tel me is it possible to we can recover dropped tablespace using rman ? if yes !then how?
    i am waiting for your rply mr. kamran”

    This is off topic, but let me to give answer.
    Of course this is possible to recover dropped tablespace using RMAN.Firstly what is your RDBMS version? if this is 11g then you can use tablespace point-in-time recovery(TSPTR) and can achieve that(however current control files does not have any information about that tablespace).Also there are several situations and scenarios.When you RESTORE/RECOVER database(So DBPTR according dropping time) during recovering process this tablespace will create and recover automatically.So refer documentation for more information(Backup and Recovery Guide).

  4. Sarkhan Says:

    Thanks Kamran.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>