- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to delete a log file on HP-UX 11.23/11.31
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
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
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
01-25-2012 06:34 PM
01-25-2012 06:34 PM
How to delete a log file on HP-UX 11.23/11.31
Hello,
How to delete a log file if it is currently being written by a process or application on HP-UX ?
Thanks,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2012 06:38 PM
01-25-2012 06:38 PM
Re: How to delete a log file on HP-UX 11.23/11.31
or rm * to remove all logs file. But you must know first where the location of the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2012 09:41 PM
01-25-2012 09:41 PM
Re: How to delete a log file on HP-UX 11.23/11.31
>How to delete a log file if it is currently being written by a process?
You have a problem. You have to know how the process is accessing the log. If it keeps the file open, if you remove it, the file will still grow but only lsof will see it.
If it opens and closes the file each time, you remove it and it may be recreated.
If you try to reset the EOF to 0, the application may continue to write to what it thinks is the old EOF, so you may nuke the contents up to that EOF.
Or it may just start writing at the beginning.