Clear logs in unix sco 5.0.4


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Clear logs in unix sco 5.0.4
# 1  
Old 03-27-2002
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
# 2  
Old 03-27-2002
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to clear logs for every 6 hours in solaris

Hi Folks, I need to remove log files for six hours on Solaris. before i used to do for every 24 hours below is the code for 1 day older log files, now i tried using -mmin +360 but it says command not found. Can someone please help me out!!! part of the code: LOG_FILE=`find /home/Logdir... (1 Reply)
Discussion started by: Sendhil.Kumaran
1 Replies

2. UNIX for Dummies Questions & Answers

Unix : About options of clear command ?

Hello everyone, My question is quite simple, even if I didn't find an answer. I would want a command (maybe clear with some options ?) that can do the following : clear completely the console, as it is when we start a console for the first time. My problem is that I sometimes display a lot... (5 Replies)
Discussion started by: Ben31400
5 Replies

3. Shell Programming and Scripting

How to clear history logs of all terminal sessions

Hi, I would normally clear off the history entries from a terminal by using the following commands: > ~/.bash_history history -c But this will remove the entries of that particular session only. How to prune all the entries of all login sessions for a particular user in a system? N.B:... (3 Replies)
Discussion started by: royalibrahim
3 Replies

4. SCO

load sco xenix and sco unix binary ?

Hi I have some sco xenix object, bin and archive files that operate in sco unix 5.0.7. I know that sco unix kernel can support sco xenix binary. I want to know how can I link xenix and unix archives together? (0 Replies)
Discussion started by: javad1_maroofi
0 Replies

5. HP-UX

Unix Security - SU logs

Hi, Hope its good with everyone. I have the below su logs and i dont understand the bolded numbers. can someone help me please. Jul 24 11:55:50 su: - 8 username Jul 24 12:12:40 su: - 10 username Jul 26 11:15:32 su: - 7 username I understand these are failed logins but what does that... (1 Reply)
Discussion started by: indraseng
1 Replies

6. UNIX for Advanced & Expert Users

FTP Logs in Unix

Hi. Is there a way or command (other than netstat) in Unix to find out or get a list a users who FTP into a particular server? Like, say last 1000 users. I need to get the user ID (any info), who FTP to a particular server. netstat gives only the users who have an FTp session currently. ... (4 Replies)
Discussion started by: manisendhil
4 Replies

7. UNIX for Dummies Questions & Answers

FTP Logs in Unix

Hi. Is there a way or command (other than netstat) in Unix to find out or get a list a users who FTP into a particular server? Like, say last 1000 users. I need to get the user ID (any info), who FTP to a particular server. netstat gives only the users who have an FTp session currently. ... (2 Replies)
Discussion started by: manisendhil
2 Replies

8. UNIX for Dummies Questions & Answers

Clear Case views on UNIX

Friends, I was asked to work on Clear Case after setting up. For this created a dynamic view by using the command, 'cleartool mkview -tag <view name> -stgloc viewstg'. Now I am not sure how to proceed further :-( May I request you to help me out in continuing further. I have a deadline in... (1 Reply)
Discussion started by: mmohan
1 Replies

9. HP-UX

Unix - Logs

Hi All, Can anybody tell me, how to trace out user access to the Unix Server Machine, (i,e) I want to find out the user who had executed some commands to alter the cron file. Regards Nag (3 Replies)
Discussion started by: nag_sundaram
3 Replies

10. Filesystems, Disks and Memory

SCO TCP/IP runtime System for SCO Unix

Hi everyone i have a question for all of you. It may be basic or it may be a good one. I recently aquired a copy of "SCO TCP/IP runtime System for SCO Unix" (thats what the disks say) and for the life of me i can not get it to load. i have tried opening the disk in linux and it can not determine... (0 Replies)
Discussion started by: Cerberus
0 Replies
Login or Register to Ask a Question