Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: linux scripting question
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-lReceived on Wed Mar 21 2007 - 06:48:03 CDT
![]() |
![]() |