Íáæá ÇÎÑí


ÇÏÎá åÐÇ ÇáÇãÑ
If the file is missing simply issue the following three commands to allow it to rebuild:

ßæÏ:
systemctl restart systemd-journald.socket
systemctl restart systemd-journald
systemctl restart rsyslog
ÌÑÈ åÐÇ
The touch command creates files in Linux through the terminal.

ßæÏ:
touch /var/log/messages

This is where the errors occurred.


Next rotate files:
ßæÏ:
journalctl --rotate
Then I delete the old entries:
ßæÏ:
journalctl --vacuum-time=1s
I then delete all files from the directory:
ßæÏ:
var/log/journal
Then delete the file:
ßæÏ:
var/lib/rsyslog/imjournal.state
(This file stores the rsyslog state for journal file reading)

The files will be restored after restarting the services.


Now you just need to restart the services:


ßæÏ:
systemctl restart systemd-journald.socket
systemctl restart systemd-journald
systemctl restart rsyslog
And everything is back to normal.