LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-07-2014, 01:04 PM   #1
tezarin
Member
 
Registered: Nov 2007
Posts: 133

Rep: Reputation: 0
Deleting proxy log files?


Hi all,

I have a ClearOS firewall installed on one of my UNIX machines and would like to delete all the logs associated with all the users activities (visiting websites, proxy, etc.) over the past years and would like to clear the files so it doesn't contain any proxy data.

Will the following commands take care of it or I should be doing something else as well? Thanks in advance

1) cd /var/log

2) rm -rf boot.log.1 boot.log.2 boot.log.3 boot.log.4 compliance.1 compliance.2 compliance.3 compliance.4 cron.1 cron.2 cron.3 cron.4 maillog.1 maillog.2 maillog.3 maillog.4 messages.1 messages.2 messages.3 messages.4 rpmpkgs.1 rpmpkgs.2 rpmpkgs.3 rpmpkgs.4 secure.1 secure.2 secure.3 secure.4 snortsam.1 snortsam.2 snortsam.3 snortsam.4 spooler.1 spooler.2 spooler.3 spooler.4 system.1 system.2 system.3 system.4 syswatch.1 syswatch.2 syswatch.3 syswatch.4 webconfig.1 webconfig.2 webconfig.3 webconfig.4

3) echo > /var/log/messages

4) echo > /var/log/maillog

5) cd /var/log/squid

6) rm -rf access.log.1.gz access.log.2.gz access.log.3.gz access.log.4.gz access.log.5.gz adzapper.log.1 adzapper.log.2 adzapper.log.3 adzapper.log.4 cache.log.1.gz cache.log.2.gz cach.log.3.gz cache.log.4.gz cache.log.5.gz store.log.1.gz store.log.2.gz store.log.3.gz store.log.4.gz store.log.5.gz

7) >/var/log/squid/access.log

8) >/var/log/squid/adzapper.log

9) >/var/log/squid/cache.log

10) >/var/log/squid/store.log

Thanks
 
Old 08-08-2014, 05:38 AM   #2
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
The default directory is /var/log. if someone or you have not changed the location for sometimes.
http://www.clearcenter.com/support/d...ide/log_viewer
 
Old 08-08-2014, 08:05 AM   #3
tezarin
Member
 
Registered: Nov 2007
Posts: 133

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fortran View Post
The default directory is /var/log. if someone or you have not changed the location for sometimes.
http://www.clearcenter.com/support/d...ide/log_viewer
Thanks for your reply. These are all the files found under the /var/log directory. This is a ClearOS firewall, so Which ones should I be cleaning up? Thanks in advance

Code:
[root@servername ~]# cd /var/log
[root@servername log]# ls -l
total 472340
-rw-r----- 1 root         root             28302 Aug  1 13:37 acpid
-rw------- 1 root         root            369464 Feb 19  2011 anaconda.log
-rw------- 1 root         root             29276 Feb 19  2011 anaconda.syslog
-rw------- 1 root         root                 0 Aug  3 04:07 boot.log
-rw------- 1 root         utmp         466611840 Aug  8 06:04 btmp
drwxr-xr-x 2 clamav       clamav            4096 Dec  2  2010 clamav
-rw------- 1 root         root                 0 Aug  3 04:02 compliance
-rw------- 1 root         root            720993 Aug  8 09:02 cron
drwxr-x--- 2 dansguardian dansguardian      4096 Aug  3 04:02 dansguardian
lrwxrwxrwx 1 root         root                21 Feb 19  2011 dansguardian-av ->                                                              /var/log/dansguardian
-rw-r--r-- 1 root         root             22852 Aug  1 13:35 dmesg
-rw------- 1 root         root             24072 Nov 14  2011 faillog
drwx------ 2 root         root              4096 Aug  3 04:02 httpd
drwx------ 2 root         root              4096 Mar 14  2007 iptraf
drwxrwxr-x 2 root         root              4096 Feb 20  2011 kolab
-rw-r--r-- 1 root         root            292876 Aug  8 09:03 lastlog
-rw------- 1 root         root               231 Aug  8 04:02 maillog
-rw------- 1 root         root           1008062 Aug  8 09:03 messages
drwxr-xr-x 2 root         root              4096 Feb 19  2011 pm
drwx------ 2 root         root              4096 Oct 24  2009 ppp
-rw-r--r-- 1 root         root             18266 Aug  8 04:02 rpmpkgs
drwx------ 3 root         root              4096 Mar  1  2011 samba
-rw------- 1 root         root           4426871 Aug  8 09:03 secure
drwxr-xr-x 2 root         root              4096 Aug  8 04:02 snort
-rw-r--r-- 1 root         root            196722 Aug  8 08:40 snortsam
-rw-r--r-- 1 root         root           3080055 Aug  3 04:03 snort.tar.gz
-rw------- 1 root         root                 0 Aug  3 04:07 spooler
drwxr-x--- 2 squid        squid             4096 Aug  6 10:35 squid
-rw------- 1 root         root           1802918 Aug  8 00:14 suva
-rw------- 1 root         root             72039 Aug  8 09:02 system
drwxr-xr-x 2 system-mysql system-mysql      4096 Aug  3 04:07 system-mysql
-rw-r--r-- 1 root         root             94048 Aug  8 09:01 syswatch
-rw------- 1 root         root                 0 Feb 20  2011 tallylog
-rw------- 1 root         root           3458857 Aug  8 09:03 webconfig
-rw-rw-r-- 1 root         utmp            870528 Aug  8 09:03 wtmp
-rw-r--r-- 1 root         nobody           63623 Aug  1 13:37 Xorg.0.log
-rw-r--r-- 1 root         nobody           63756 Aug  1 13:34 Xorg.0.log.old
-rw-r--r-- 1 root         root              7032 Aug  6 06:52 yum.log
 
Old 08-13-2014, 11:27 AM   #4
tezarin
Member
 
Registered: Nov 2007
Posts: 133

Original Poster
Rep: Reputation: 0
Anyone? I would really appreciate it.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ZFS does not release space even after deleting apache log files in a non-global zone Nue-b Solaris / OpenSolaris 2 03-25-2014 02:06 PM
Disk is not release after deleting log files /home manishrmusale Linux - Newbie 10 05-06-2013 07:50 PM
Sample Squid Proxy Log Files harshaabba Linux - Server 6 09-13-2012 07:42 PM
apache startup error after deleting up apache log files jayakumar01 Linux - Server 2 12-15-2011 11:13 AM
Need terminal command for safely deleting log files and other useless garbage in / ahurd Linux - Newbie 8 02-24-2009 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:19 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