ls showing dates without year, even for files older than 1 year

Advertisement

mcdermit
Guest

ls showing dates without year, even for files older than 1 year

As previously mentioned in this old topic https://winscp.net/forum/viewtopic.php?t=1804, the ls command is displaying file dates without the year, even for 1+ year old files, which makes it impossible to infer the correct date if the server holds any old files.

I am using the latest WinSCP, 5.19.5 (Build 11933 2021-11-25), on Windows 10. At the command prompt, I type winscp, then open the server in question, enter username & password, then type the command ls. Here's a sample of the output:
----------   0                        5305 Mar  7 11:02 XXXXXXXXXX 2020_03_07_080245.xlsx
----------   0                        5305 Mar  8 11:02 XXXXXXXXXX 2020_03_08_080254.xlsx
----------   0                        5305 Mar  9 11:02 XXXXXXXXXX 2020_03_09_080243.xlsx
In this case, the file names happen to include date information, which shows they were created in 2020, but from the listed timestamp, "Mar 7 11:02", I would normally infer that they were created in 2021 (since today is 2/8/2022).

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
38,177
Location:
Prague, Czechia

Re: ls showing dates without year, even for files older than 1 year

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

mcdermit
Joined:
Posts:
3

Thank you for the update. I appreciate your attention on this.

No change.

Just as in the original log file, timestamps appear correct in lines
100 - 2725, and
2742 - 5366,
but are all shown without year on lines 5368 - 7992, and in the output to stdout, regardless of age.

Reply with quote

Advertisement

You can post new topics in this forum