Why can this file have the modified date that is newer than the current date?
What makes you think it is newer? What is your timezone?
My time zone is gmt+8.
As you can see from the screenshot, the date-time shown from the desktop (KDE) was 2024-02-14 19:42, but the modified time of that file was 2024-02-15-01:52!!! Surprised!!
As it does not show time zone, it is rather meaningless.
It is also for the gmt+8.
I see three with that time stamp… perhaps system time had not synced when created, or whatever created is using UTC…
Instead of showing a screenshot where there is missing information, you should copy-n-paste from the terminal into Preformatted Text (</> on toolbar) here.
And be sure the copy-n-paste includes the actual command you used to list the files and the ending prompt that follows For example
:/run/systemd/journal # ll
total 8
srw-rw-rw- 1 root root 0 Feb 14 05:44 dev-log
-rw-r--r-- 1 root root 0 Feb 14 05:44 flushed
srw------- 1 root root 0 Feb 14 05:44 io.systemd.journal
-rw-r--r-- 1 root root 8 Feb 14 05:44 kernel-seqnum
-rw-r--r-- 1 root root 24 Feb 14 05:44 seqnum
srw-rw-rw- 1 root root 0 Feb 14 05:44 socket
srw-rw-rw- 1 root root 0 Feb 14 05:44 stdout
drwxr-xr-x 2 root root 980 Feb 14 08:38 streams
srw-rw-rw- 1 root root 0 Feb 14 05:44 syslog
:/run/systemd/journal #
The easiest explanation is that the system’s time or timezone was wrong at the moment the file was modified. I could see such a behavior before when something with my configured NTP server went wrong and that can lead to nasty issues that are hard to find.
… or, perhaps, it IS from the future.
After all, openSUSE is quite an advanced operating system.
I check the file modified date again today.
And still there are same files with their modified date about the half-day ahead than the current date.
~@mypc:/run/systemd/journal> ls -ilt --full-time
46 srw-rw-rw- 1 root root 0 2024-02-16 03:40:17.879999984 +0800 dev-log
47 srw-rw-rw- 1 root root 0 2024-02-16 03:40:17.879999984 +0800 socket
48 srw-rw-rw- 1 root root 0 2024-02-16 03:40:17.879999984 +0800 stdout
~@mypc:/run/systemd/journal> date
Thu Feb 15 07:54:53 PM CST 2024
I tried to cat those files, but as you can see following, they are not existed!!!
~@mypc:/run/systemd/journal> cat socket
cat: socket: No such device or address
~@mypc:/run/systemd/journal> cat dev-log
cat: dev-log: No such device or address
~@mypc:/run/systemd/journal> cat stdout
cat: stdout: No such device or address
Oka~~ They might be really the files in the “future”.
So that’s why I cant not cat them right now
You see the first letter of those entries? it is s
. Which means they are not normal files (which have -
) or directories (which have d
), or … (there are more like c
and b
).
They are Sockets.
Maybe this can lead to an explanation.
@ddtty so what does the output from the command timedatectl
show on this system?
It is
~@mypc:~> timedatectl
Local time: Thu 2024-02-15 21:11:08 CST
Universal time: Thu 2024-02-15 13:11:08 UTC
RTC time: Thu 2024-02-15 21:12:38
Time zone: Asia/Taipei (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
@ddtty Set your BIOS clock to UTC time… If your dual booting with Windows, then set RealTimeIsUniversal
in the registry…
Those are sockets (hence the ‘s’) . Do you know what “stdout” is (?) … it is something most everyone has seen at a Linux command line. The output you’ve posted in your reply is what is stdout (for example, the textual output from commands). There’s a bit more to it than that, and even more when considering what a socket is. It would behoove you to do some research on these. A simple example of one sockets (the DT discrepancy is another matter.)