- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need HP UX command
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
Forums
Discussions
Discussions
Discussions
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
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
07-16-2012 02:11 AM
07-16-2012 02:11 AM
Need HP UX command
HI,
Since we maintain database files regularly, i'm looking for an hp-ux command to remove files that:
1-have the word "arch" in their names.
2-have "dbf" extension.
3-older than two days.
please provide me with the single command so that i remove all files that meet the three conditions above at once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2012 03:15 AM
07-16-2012 03:15 AM
Re: Need HP UX command
The command you need is "find".
find /some/directory -name "*arch*.dbf" -mtime +1 -exec rm {} \+
-mtime +1 means "older than 1 full day, ignoring fractional days" = "at least 2 full days old" = "48 hours old or older". If this is not what you want, adjust the value. (-mtime +2 would be "72 hours old or older")
This looks like you're removing database archivelogs. If the archivelogs are used for on-line database backups, why does the backup software not delete the old archivelogs when (and *only* when) they've been successfully stored on tape?
If you delete all archivelogs older than 2 days without making sure they're successfully backed up first, and the tape backup system fails on a Friday evening and cannot be fixed until Monday, this will start removing archivelogs that are not backed up, breaking the archivelog chain. A broken archivelog chain makes it difficult to restore the database state to any point in time after the break.
To recover from a broken archivelog chain, a full database backup may be required so that a new chain of archivelogs can be started. If your database is large, a full backup might take a very long time. With multi-terabyte databases, accepting that the database will stop if the backup hardware fails and archivelog space fills up might result in a shorter service break than breaking the log chain and making the full backup before resuming normal service (been there, learned the lesson!).
- Tags:
- find