0

I am a Kubuntu 20.04 user. Using the disk usage manager tool, I found out that there are around 32 gb log files in my log folder under var directory. But I cannot track where the files are. When I clicked in side the folder as root privileged user, I found out that there are only 500 mb log files. I am attaching the image of my directory status.

Anyone have a clue about that??enter image description here

  • 1
    Use a tool like the Files tool or even ls -s /var/log in a terminal to see your log files and identify the ones taking up all the space. – ubfan1 May 29 at 4:02
  • How can I identify which are taking spaces?? any clue about it. – Arka Bhuiyan May 29 at 4:05
  • 1
    Providing terminal output is more useful. There's something not okay with your system if you have gigantic log files. Trying to stop log files from created is probably the wrong way to go about solving the issue. – DK Bose May 29 at 6:22
2

They may be hidden files, open a terminal and list all files including hidden

sudo ls -ahlS /var/log

This will list all files, showing human readable file sizes, in list format and sort by size, largest first. Does that help?

If you find the large files that way, you can open your file manager as root and make sure you're showing hidden files to delete/manage those files.

| improve this answer | |
  • found that syslog.1 and kern.log are the huge files. but how can I delete them from terminal?? please give some insights. – Arka Bhuiyan May 29 at 4:08
  • oh I solved it. but how can I prevent the log files being created?? any idea? – Arka Bhuiyan May 29 at 4:12
  • See the comment by DK Bose on your question, you need to find out what the issue is - why those log files are so large and fix the cause. Are there many repeated lines in those logs? – Mark Aroni Jun 2 at 8:32
  • 1
    these log files are mainly generated by pci errors caused by windows. this bug is quite familiar in hp laptops. after a fresh start, if you select ubuntu intentionally or not, your system may not function properly. I found a solution fro itsfoss.net. they guided to edit the grub configuration file so that no more pci errors take place. here is the link: itsfoss.com/pcie-bus-error-severity-corrected – Arka Bhuiyan Jun 2 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.