Jifri Valanchery
Jifri Valanchery

Reputation: 348

How to manage files in /var/log/journal/ in ubuntu 18.04?

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

Upvotes: 5

Views: 3528

Answers (1)

Jifri Valanchery
Jifri Valanchery

Reputation: 348

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

Upvotes: 8

Related Questions