- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trim large log file
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
тАО08-21-2007 07:16 PM
тАО08-21-2007 07:16 PM
trim large log file
How to trim large log file.
6935040073 Aug 22 10:09 wls_production.log
thanks
- Tags:
- trim logfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:19 PM
тАО08-21-2007 07:19 PM
Re: trim large log file
Asif,
You can do
# > wls_production.log
this will nullify the log.
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:23 PM
тАО08-21-2007 07:23 PM
Re: trim large log file
Trim as in clear it?
# cp /dev/null wls_production.log
You could also save the last portion of the file to a backup file.
# tail -10000 wls_production.log > wls_production.log.1
and then empty the file.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:32 PM
тАО08-21-2007 07:32 PM
Re: trim large log file
cp wls_production.log /newdir/wls_production.log
> wls_production.log
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:33 PM
тАО08-21-2007 07:33 PM
Re: trim large log file
>wls_production.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:37 PM
тАО08-21-2007 07:37 PM
Re: trim large log file
this is also not working
cp /dev/null wls_production.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:41 PM
тАО08-21-2007 07:41 PM
Re: trim large log file
>wls_production.log
What do you mean? Don't want to? Or something prevents you?
>this is also not working
cp /dev/null wls_production.log
How? This isn't the best way to do it. Using ">" is the proper way.
If the file is open and being actively written, it probably won't help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 07:49 PM
тАО08-21-2007 07:49 PM
Re: trim large log file
this file is open and being actively written,
I tried
>wls_production.log
/dev/null >wls_production.log
vi
ex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 08:15 PM
тАО08-21-2007 08:15 PM
Re: trim large log file
I don't know what version of weblogic you are running, but you can set up log rotation. Have a look at this doc.
http://e-docs.bea.com/wls/docs81/ConsoleHelp/logging.html#1047443
Regards,
Robert-Jan
Ps.
Dennis "This isn't the best way to do it" Well then you will need to rewrite a lot of documentation :-) example emr_na-c01025048-1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 08:16 PM
тАО08-21-2007 08:16 PM
Re: trim large log file
As there a way to send a signal to it to restart the log? I.e. kill -HUP?