Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: linux scripting question

Re: linux scripting question

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Wed, 21 Mar 2007 12:48:03 +0100
Message-ID: <46011B73.8030008@gmail.com>


Niall Litchfield schrieb:
> hopefully a quick one for peope with much more shell scripting than me.
>
> I need a way to determine (possibly for an arbitrary period) the total
> size of files modified in the last n days in a directory tree. Ideally
> I'd also know where the space hogs are in the tree (i.e directories
> that have grown the most in the last n days). I can do the parts of
> this, but am having trouble putting it all together.
>
> --
> Niall Litchfield
> Oracle DBA
> http://www.orawin.info

find ${START_DIR} -mtime -${DAYS} |xargs stat -c "%s"|awk '{sum += $1}END{print sum}'
For directory growth you 'll need to track the history,like you are doing it in the database, wouldn't you?

Best regards

Maxim

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 21 2007 - 06:48:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US