Results 1 to 4 of 4

Thread: Delete logs?

  1. #1
    Join Date
    Mar 2007
    Location
    Washington State
    Posts
    1,083

    Question Delete logs?

    Hello,

    Is it safe to delete some log files? I have some large log files, and I'd like to get some disk space back. Can I delete messages.1 and maillog.1 and so on? If so, are there any logs I can't delete?

    Thanks for the advice!

    Code:
    [email protected] [/var/log]# ll
    total 337372
    drwxr-xr-x  8 root     root      4096 Aug  6 12:44 ./
    drwxr-xr-x 23 root     root      4096 Feb 19 03:05 ../
    drwxr-xr-x  3 root     root      4096 Feb 18 13:07 bandwidth/
    -rw-------  1 root     root         0 Aug  6 12:44 boot.log
    -rw-------  1 root     root         0 Aug  2 01:22 boot.log.1
    -rw-------  1 root     root         0 Jul 26 01:22 boot.log.2
    -rw-------  1 root     root         0 Jul 19 01:22 boot.log.3
    -rw-------  1 root     root         0 Jul 12 01:22 boot.log.4
    -rw-------  1 root     utmp 146674560 Aug  6 05:33 btmp
    -rw-r--r--  1 root     root  23795836 Aug  6 13:11 chkservd.log
    -rw-r--r--  1 root     root   4501715 Feb 18 13:19 cpanel-install-thread0.log
    -rw-r--r--  1 root     root       134 Feb 18 13:19 cpanel-install-thread1.log
    -rw-r--r--  1 root     root       163 Aug  4 00:52 cpupdate.env
    -rw-------  1 root     root     17854 Aug  6 13:12 cron
    -rw-------  1 root     root   3392710 Aug  6 12:44 cron.1
    -rw-------  1 root     root   3862926 Aug  2 01:22 cron.2
    -rw-------  1 root     root   3883189 Jul 26 01:22 cron.3
    -rw-------  1 root     root   3882803 Jul 19 01:22 cron.4
    drwx------ 20 root     root      4096 Aug  6 13:10 dcpumon/
    -rw-r--r--  1 root     root         0 Jul 28 14:06 dmesg
    -rw-r-----  1 mailnull mail    204294 Aug  6 13:12 exim_mainlog
    -rw-r-----  1 mailnull mail   3340178 Aug  6 12:44 exim_mainlog.1.gz
    -rw-r-----  1 mailnull mail   1294318 Aug  2 01:22 exim_mainlog.2.gz
    -rw-r-----  1 mailnull mail   1402613 Jul 26 01:22 exim_mainlog.3.gz
    -rw-r-----  1 mailnull mail   1420374 Jul 19 01:22 exim_mainlog.4.gz
    -rw-r-----  1 mailnull mail         0 Aug  6 12:44 exim_paniclog
    -rw-r-----  1 mailnull mail        98 Aug  6 12:44 exim_paniclog.1.gz
    -rw-r-----  1 mailnull mail        20 Aug  2 01:22 exim_paniclog.2.gz
    -rw-r-----  1 mailnull mail        20 Jul 26 01:22 exim_paniclog.3.gz
    -rw-r-----  1 mailnull mail        20 Jul 19 01:22 exim_paniclog.4.gz
    -rw-r-----  1 mailnull mail     39203 Aug  6 13:12 exim_rejectlog
    -rw-r-----  1 mailnull mail   1086767 Aug  6 12:44 exim_rejectlog.1.gz
    -rw-r-----  1 mailnull mail    569589 Aug  2 01:22 exim_rejectlog.2.gz
    -rw-r-----  1 mailnull mail    606924 Jul 26 01:22 exim_rejectlog.3.gz
    -rw-r-----  1 mailnull mail    618672 Jul 19 01:22 exim_rejectlog.4.gz
    -rw-------  1 root     root     16656 Aug  5 21:50 faillog
    drwx------  2 root     root      4096 Feb 22 01:22 httpd/
    -rw-r--r--  1 root     root    202648 Aug  6 12:18 lastlog
    -rw-------  1 root     root      3152 Jun  7 10:43 lfd.log
    -rw-------  1 root     root     76999 Aug  6 13:12 maillog
    -rw-------  1 root     root  10574649 Aug  6 12:44 maillog.1
    -rw-------  1 root     root  26357485 Aug  2 01:20 maillog.2
    -rw-------  1 root     root  21101710 Jul 26 01:21 maillog.3
    -rw-------  1 root     root  12540672 Jul 19 01:19 maillog.4
    -rw-------  1 root     root     65984 Aug  6 13:12 messages
    -rw-------  1 root     root  23491846 Aug  6 12:44 messages.1
    -rw-------  1 root     root  18464877 Aug  2 00:27 messages.2
    -rw-------  1 root     root   3364340 Jul 25 22:52 messages.3
    -rw-------  1 root     root  17507672 Jul 18 23:13 messages.4
    drwxr-xr-x  2 root     root      4096 Aug  3 20:06 pm/
    -rw-r--r--  1 root     root        63 Feb 18 13:23 quota_enable.log
    -rw-r--r--  1 root     root         0 Aug  6 12:44 rpmpkgs
    -rw-r--r--  1 root     root     12753 Aug  6 01:22 rpmpkgs.1
    -rw-r--r--  1 root     root      9402 Aug  1 01:22 rpmpkgs.2
    -rw-r--r--  1 root     root      9402 Jul 25 01:22 rpmpkgs.3
    -rw-r--r--  1 root     root      9402 Jul 18 01:22 rpmpkgs.4
    drwxr-xr-x  2 root     root      4096 Aug  6 00:00 sa/
    drwx------  2 root     root      4096 Jun 21  2008 samba/
    -rw-------  1 root     root         0 Aug  6 12:44 secure
    -rw-------  1 root     root   4437663 Aug  6 12:27 secure.1
    -rw-------  1 root     root   2019473 Aug  1 22:20 secure.2
    -rw-------  1 root     root   2098680 Jul 25 22:05 secure.3
    -rw-------  1 root     root   1711166 Jul 19 01:13 secure.4
    -rw-------  1 root     root         0 Aug  6 12:44 spooler
    -rw-------  1 root     root         0 Aug  2 01:22 spooler.1
    -rw-------  1 root     root         0 Jul 26 01:22 spooler.2
    -rw-------  1 root     root         0 Jul 19 01:22 spooler.3
    -rw-------  1 root     root         0 Jul 12 01:22 spooler.4
    -rw-r--r--  1 root     root     36427 Feb 18 13:18 stunnel-4.15-build.log
    -rw-------  1 root     root         0 Apr  2 00:51 tallylog
    -rw-rw-r--  1 root     utmp         0 Aug  6 12:44 wtmp
    -rw-rw-r--  1 root     utmp    116736 Aug  6 12:27 wtmp.1
    lrwxrwxrwx  1 root     root        41 Jul 28 14:03 xferlog -> ../../usr/local/apache/domlogs/ftpxferlog
    -rw-r--r--  1 root     root         2 Aug  6 00:53 xferlog.offset
    -rw-r--r--  1 root     root         1 Mar 10 17:36 xferlog.offsetftpsep
    -rw-------  1 root     root         0 Aug  6 12:44 yum.log
    -rw-r--r--  1 root     root     18775 Aug  5 13:17 yum.log.1
    FazeWire Web Services.
    || We have provided great prices and better support since 2006. Located in Seattle, WA!
    || -----------------
    || Shared Hosting - VPS - Dedicated Servers - Colocation - Software Licenses

  2. #2
    If I were you I would keep them on a separate hdd..deleting them its only a temporary solution because after X months they are going to be the same..better increase the /var partition and do a better management of the log rotations.

  3. #3
    Join Date
    Sep 2004
    Posts
    368
    Hello,

    It is useful to delete regularly the logs.
    You can download before delete them on your local p.c. for investigation or if you server has no problems you can at least delete all old logs.
    In you post e.g. “messages” is the most actual; messages1 is older and messages4 is the oldest.
    Therefore all logs with 1/2/3/4/etc.. on the end can be deleted without problems.
    Such action is always practical.
    Hopes this help you.
    Online power for online people!

  4. #4
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853

Similar Threads

  1. Can we delete sql logs ?
    By lockingout in forum Hosting Security and Technology
    Replies: 13
    Last Post: 07-08-2008, 11:08 AM
  2. How to delete logs older than 30 days ?
    By lockingout in forum Web Hosting Lounge
    Replies: 0
    Last Post: 07-07-2008, 07:24 AM
  3. How do I delete URCHIN stats logs?
    By WebSavvyGuy in forum Hosting Software and Control Panels
    Replies: 2
    Last Post: 09-09-2005, 09:56 AM
  4. Which logs should I delete in /var ?
    By Stobe in forum Dedicated Server
    Replies: 6
    Last Post: 12-04-2004, 07:07 AM
  5. How to delete logs files ?
    By giza in forum Dedicated Server
    Replies: 9
    Last Post: 07-04-2002, 05:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •