- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script to backup log file and open new log fil...
Operating System - HP-UX
1752720
Members
5647
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
12-19-2005 03:24 AM
12-19-2005 03:24 AM
Re: Script to backup log file and open new log file
Hey;
You need a fi at the end of your script...
if [ test condtion ]
then
...
fi
HTH
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
You need a fi at the end of your script...
if [ test condtion ]
then
...
fi
HTH
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2005 03:32 AM
12-19-2005 03:32 AM
Re: Script to backup log file and open new log file
Actually, for open log files, it's better to mv, not cp. That way the process that has it open can continue writing to it. You can then touch a new file with the original name, if necessary, and then restart the process so it starts using the new file. This is exactly what logrotate does when you use the "create" option. If you cp the file and the null the original, you potentially lose data.
I've been playing with logrotate on an HP-UX system. I was disappointed by the version at the Porting Center. It doesn't have as many of the options as the latest versions available as source from http://packages.qa.debian.org/l/logrotate.html, but if you have no way to compile (or don't want to bother with compiling), it'll do the basics well enough.
I've been playing with logrotate on an HP-UX system. I was disappointed by the version at the Porting Center. It doesn't have as many of the options as the latest versions available as source from http://packages.qa.debian.org/l/logrotate.html, but if you have no way to compile (or don't want to bother with compiling), it'll do the basics well enough.
--
Jeff Traigle
Jeff Traigle
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP