LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-31-2007, 05:57 AM   #1
crackerB
Member
 
Registered: Aug 2006
Posts: 37

Rep: Reputation: 15
Clearing all the log files.


Hi,
How can I clear all the logs in /var/log/audit..?
Deleting one by one creating a long time..
Is it possible to configure to delete it automatically..?
 
Old 12-31-2007, 06:18 AM   #2
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Code:
# > /var/log/audit/audit.log
or
Code:
# cat /dev/null > /var/log/audit/audit.log
put it in a cron job
 
Old 12-31-2007, 06:25 AM   #3
crackerB
Member
 
Registered: Aug 2006
Posts: 37

Original Poster
Rep: Reputation: 15
clearing logs

I did this...
But, It is taking long time to delete one by one...
I want to clear the all the files..
 
Old 12-31-2007, 06:53 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Use logrotate or tmpwatch, both come with just about every distro.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing last log keysorsoze Linux - General 2 10-28-2006 08:03 AM
Clearing the var/log/adm/messages? as400 Solaris / OpenSolaris 17 04-17-2006 03:41 AM
clearing log files curos Slackware 1 08-05-2005 01:51 AM
Clearing Temporary Files jjorloff1 Red Hat 1 01-25-2004 07:32 PM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration