GNU bug report logs -
#75682
ls -l sometimes shows a year in place of the hour and minute
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hello Coreutils maintainers,
I believe I've found a bug in the coreutils' ls command.
I was watching a file with watch and ls -l while it was being updated, but sometimes I saw that the time would display a year instead of an hour and minute.
Later I reproduced this issue by doing the following:
- open a terminal emulator
- create two tabs
- run `touch test`
- in tab 1, run
either
while (true); do { ls -l test; }; done;
or
while (true); do { ls -l test | grep -F 2025; }; done;
- in tab 2, run
while (true); do {
head -c 1 </dev/urandom | grep '[0-9]' | xargs -r -I LENGTH truncate -cs LENGTH test;
}; done;
One tab randomly changes the length of file, while the other shows ls -l of the tile.
In tab 1 I see this:
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 2025 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
Do you know what might be causing this if it's my system instead of coreutils' ls?
x Kasia
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wrsEARYKAG0FgmeNoEYJkJB2+lKi7Z06RRQAAAAAABwAIHNhbHRAbm90YXRp
b25zLm9wZW5wZ3Bqcy5vcmeKB0EiDKo4Q8tcb+sPDcQmtDFjBfOONCanoH3P
zU3VaRYhBOhSZ7P0U35Z9WJN9ZB2+lKi7Z06AACrzQEAg7+S4Y3v8VBJYdRA
3/KlH6A07kxdL8777aXuLGDqdXEA/if94j5pOe7DkpXfqLvK/PgJCvah/SGb
WLUUEVPd9XMD
=jtIB
-----END PGP SIGNATURE-----
[publickey - xo.okasia@proton.me - 0xE85267B3.asc (application/pgp-keys, attachment)]
[publickey - xo.okasia@proton.me - 0xE85267B3.asc.sig (application/pgp-signature, attachment)]
This bug report was last modified 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.