LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-26-2012, 10:22 AM   #16
MustardMan
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0

I realize this thread is a bit old.

Here is what I use. It will empty all files in /var/log and its subdirectories while preserving permission and ownership. You will probably need to restart syslog/rsyslog afterwards. Works for me.

#!/bin/sh
loglist=`find /var/log -type f`
for i in $loglist
do
> $i
done

Last edited by MustardMan; 01-26-2012 at 10:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Tips for PC games of all kinds.... lowpingnoob General 1 07-01-2005 12:31 AM
Fonts looks awful on Debian Linux... how do I make it look good and clear like MS? ExCIA Linux - Newbie 2 05-17-2005 06:39 PM
What kinds of linux should I select? Jason_zwf Red Hat 2 08-07-2004 09:09 AM
Differnt kinds of Linux satusred Linux - Software 6 11-02-2003 04:59 PM
All kinds of problems with SuSE. uploadjoe Linux - Software 1 02-22-2003 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:28 PM.

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