LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Deleting proxy log files? (https://www.linuxquestions.org/questions/linux-general-1/deleting-proxy-log-files-4175513886/)

tezarin 08-07-2014 01:04 PM

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

fortran 08-08-2014 05:38 AM

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

tezarin 08-08-2014 08:05 AM

Quote:

Originally Posted by fortran (Post 5217465)
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


tezarin 08-13-2014 11:27 AM

Anyone? I would really appreciate it.


All times are GMT -5. The time now is 12:20 AM.