- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to remove files except the two recent one from...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 10:44 PM
тАО04-01-2008 10:44 PM
We want to automate this process.
Can anybody help me out.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 10:48 PM
тАО04-01-2008 10:48 PM
Re: How to remove files except the two recent one from a series of files in hp unix 11.23
Please clarify.
Where are you doing the export of the database?
Disk or tape?
Which database software are you using? (oracle?)
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 10:58 PM
тАО04-01-2008 10:58 PM
SolutionIn case, you are doing disk-based export of the database, you will have to create a script that purges the old data. Then, you will also have to create a crontab entry so that the script is executed at the predetermined interval.
E.g.
Script (extract)
===============
DIR=/data/export
find $DIR -xdev -type f -mtime +2 -name '*.dmp' -exec rm -f {}+
Crontab Entry
==============
#*******************************************************
# min|hour |day |month|day |script
# | |of mo| |of wk|
#----|-----|-----|-----|-----|--------------------------
30 01 * * * /home/yogeeraj/scripts/purge_exp.sh 1> /home/yogeeraj/scripts/logfiles/output-purge_exp.crn 2>/home/yogeeraj/scripts/logfiles/error-purge_exp.crn
#*********************************************************
# min|hour |day |month|day |script
# | |of mo| |of wk|
#----|-----|-----|-----|-----|----------------------------
#*********************************************************
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2008 11:04 PM
тАО04-01-2008 11:04 PM
Re: How to remove files except the two recent one from a series of files in hp unix 11.23
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1217253
note that you should ensure that you should ensure that your recovery window is acceptable or old backup are sent to secondary media as desired.
Also, if you are using Oracle, EXP is no longer considered as an efficient backup tool. You should configure RMAN which automatically performs loads of tasks without any manual intervention. The latter also ensures proper recover of the database in cases of failures.
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 03:03 AM
тАО04-03-2008 03:03 AM
Re: How to remove files except the two recent one from a series of files in hp unix 11.23
this solution is working fine.
I'm closing this thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2008 03:06 AM
тАО04-03-2008 03:06 AM