The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
Google UNIX.COM


UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
plz clear my doubts soumya_v7 UNIX for Dummies Questions & Answers 3 03-13-2008 01:06 PM
is it possible to check logs in UNIX who deleted the files? james_falco UNIX for Dummies Questions & Answers 1 07-06-2007 10:04 AM
Clear Case views on UNIX mmohan UNIX for Dummies Questions & Answers 1 05-18-2007 02:30 PM
Unix - Logs nag_sundaram HP-UX 3 07-12-2005 12:46 AM
clear console punk000 UNIX Desktop for Dummies Questions & Answers 3 07-21-2003 08:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-27-2002
Registered User
 

Join Date: Mar 2002
Posts: 6
Question Clear logs in unix sco 5.0.4

hi
my name es juan

i have sco open server 5.0.4 release

i need clear the log files as wtmp

thanks you very much
Reply With Quote
Forum Sponsor
  #2  
Old 03-27-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
In SCO Open Server
the information in /etc/wtmp is cleared out weekly by a cron job that runs /etc/cleanup, you may want to adjust this script if you need longer records to be maintained there.

Generally, you can just use the ">" to empty a log file. For example, to clear out /var/tmp/log, just use:

# > /var/tmp/log

That will empty the file while leaving ownerships and permissions intact.

Sometimes, however, you have a program that keeps the file open while it writes to the log. In such a case, you may need to stop the program, clear the log, and restart.

You can easily check to see if any process is using a file with "fuser":

# fuser /var/tmp/log

will return the pid of syslog. You can combine all this:

# ps -p `fuser /var/tmp/log

*Finally pls maintain your post in one thread. post back if this doesnt help.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0