Results 1 to 5 of 5

Thread: 13.10 kern.log @ 8GB Clear it how?

  1. #1
    Join Date
    Feb 2014
    Beans
    3

    13.10 kern.log @ 8GB Clear it how?

    Is there an application or terminal command line that will bypass permissions and reset kern.log? I get this "you are not the owner" promp.... please help because my LAN network is over logging. I am out of hdd pace due to this issue. -Doug-

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,407
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: 13.10 kern.log @ 8GB Clear it how?

    You need to use sudo to anything in /var/log.

    Try this:
    Code:
    sudo cat /dev/null > /var/log/kern.log
    That will empty the log. Before you do this though, make sure you understand why your system is so furiously logging errors. Fixing the problem is more important than fixing the symptom.

    I also recommend learning how to use the logrotate application.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Feb 2014
    Beans
    3

    Re: 13.10 kern.log @ 8GB Clear it how?

    Correct! But kern.log has to be shrunk to further analyze the problem (HDD space is maxed out), after the shrinking, and the new log enties are written.

    Note:The problem appears to be coming from network logs coming from LAN acoording to what I see in gedit.

    I attempted that command in the last few days, and I get "Permission Denied" You are not the owner... so I am stuck at the moment for that PC so I'm on another machine to avoid filling up the 20GB SSD drive partition on that CF-19 Toughbook and crashing.

    Yep I'm kinda new to Linux, but I've felt the extreme need to get away from Bill Gates...

  4. #4
    Join Date
    Feb 2014
    Beans
    3

    Re: 13.10 kern.log @ 8GB Clear it how?

    Am not able to find any common cleaning commands on the forum to run logrotate. how do I get around the permmission denied "not owner" prompt when running sudo cat /dev/null > /var/log/kern.log ???

  5. #5
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    3,118
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: 13.10 kern.log @ 8GB Clear it how?

    sudo cat /dev/null >/var/log/kern.log runs cat as root, but not the output redirect to the log file. Try
    Code:
    sudo tee /var/log/kern.log </dev/null
    instead, to give the writing process root permissions.

    Some background information on sudo and permissions, which everybody using Linux ought to learn some day:
    https://help.ubuntu.com/community/RootSudo
    https://help.ubuntu.com/community/FilePermissions

Bookmarks

Posting Permissions

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