Thursday, July 28, 2011

100% Mount Pt

Commands tht Helps :

cd <source directory>
find . -type f -mtime +30 | cpio -pd <destination directory>    
- Copies 30days above old files to <destination directory> 

find . -type f -mtime +90 -exec mv {} <destination directory> \;
-    Moves all the 90+ days old data to <destination directory> 

find . -type f -mtime +30 -exec rm -f {} \;          - Deletes 30days Old files

Scenario:

Mount pt reaching 100% full

[oraplayers21:ORAPLAYERS:applmgr]$df -h /oraplayers/common

ora-players:/oraplayers-common
                       150G   148G   2G    99%    /oraplayers/common

-    Moved all the 90+ days old data in “$APPLCSF/log” to a temp location  “/oplayers/admin/kiran/applcsf_log_90daysold” using the below cmd

[oraplayers21:ORAPLAYERS:applmgr]$ find . -type f -mtime +90 -exec mv {} /oplayers/admin/kiran/applcsf_log_90daysold \;
[oraplayers21:ORAPLAYERS:applmgr]$

ora-players:/oraplayers-common   150G   138G    13G    92%    /oraplayers/common

UR's Key Run ;-) 

No comments:

Post a Comment