1

Many of my journal log files consistently are named ending with tilde, e.g. -

/var/log/journal/dc104498c02e4392903c4b68c856a662 $ ls -ltrh
total 768M
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 11:59 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:08 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:10 [email protected]~
-rw-r-----+ 1 root systemd-journal 8.0M Jun 11 12:16 [email protected]~
-rw-r-----+ 1 root systemd-journal  16M Jun 12 11:19 [email protected]~
...

They also happen to be always multiples of 8M in size.

What might cause this?

I suspect the files may be incomplete, but they seem to always end properly -

journalctl --file [email protected]~ | tail
Jun 11 12:16:30 z390 audit: BPF prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 kernel: audit: type=1334 audit(1654974990.059:192): prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 audit: BPF prog-id=0 op=UNLOAD
Jun 11 12:16:30 z390 systemd[1]: Using hardware watchdog 'iTCO_wdt', version 0, device /dev/watchdog0
Jun 11 12:16:30 z390 systemd[1]: Watchdog running with a timeout of 10min.
Jun 11 12:16:30 z390 kernel: watchdog: watchdog0: watchdog did not stop!
Jun 11 12:16:30 z390 systemd-shutdown[1]: Using hardware watchdog 'iTCO_wdt', version 0, device /dev/watchdog0
Jun 11 12:16:30 z390 systemd-shutdown[1]: Watchdog running with a timeout of 10min.
Jun 11 12:16:30 z390 systemd-shutdown[1]: Syncing filesystems and block devices.
Jun 11 12:16:30 z390 systemd-journald[569]: Journal stopped
5
  • Are these logs rotated by logrotate or some other log rotation software?
    – Kusalananda
    Commented Jun 15, 2022 at 5:49
  • As a general line, tilde terminated filenames denote temporary files. Perhaps they're not being cleaned up for some reason? I'm not aware of the specifics of journald file management though.
    – Zip
    Commented Jun 16, 2022 at 0:39
  • Yes, logrotate.timer is in systemd which runs daily. But the clean split (the lines in ~ files always start with a boot, and ends at poweroff or reboot) makes me suspect it is something else that runs on reboot which causes them to be left like that.
    – KalEl
    Commented Jun 16, 2022 at 7:53
  • Only files starting with system@... have this problem. There is no journal files starting with user-1000@... that end with ~.
    – KalEl
    Commented Jun 16, 2022 at 8:01
  • Traditionally in Unix-like systems files ending with a tilde are backup files. For example, most text editors use this convention. Commented Jun 16, 2022 at 8:07

1 Answer 1

1

I have some user files with the ~ on them.

-rw-r-----+ 1 root systemd-journal 25165824 Jan 29 13:01 [email protected]~

-rw-r-----+ 1 root systemd-journal 8388608 Jan 29 13:07 [email protected]~

-rw-r-----+ 1 root systemd-journal 8388608 Jan 29 13:20 [email protected]~

-rw-r-----+ 1 root systemd-journal 67108864 Feb 19 20:27 [email protected]~

I am thinking when the computer freezes up and do a hard power reboot by holding the power button in for more than 5 seconds might cause these.

Not the answer you're looking for? Browse other questions tagged .