5

I want to learn about and manage the directory /var/log/journal/ in ubuntu 18.04

  • What data is logged to it and when?
  • Is there any issue in deleting all files from that directory?
  • Is there any way to set delete old data (eg. 1 month)?
1

1 Answer 1

8

I have learned it in weak end - adding a short note here

  • journald is - systemd’s logging service

  • Journalctl is a utility for querying and displaying logs from journald

  • the logs are stored in /var/log/journal/ (except, when we delete the directory)

  • we can manage the size and etc in /etc/systemd/journald.conf

  • useful journalctl commands

    • journalctl - to view all logs
    • journalctl --disk-usage - to check disk usage
    • journalctl --since "2020-09-24 00:00:00" --until "2020-09-24 23:59:59" - to view logs in between this time range
    • journalctl -f - tail the logs
2

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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