we have the following phenomenon

sftp connectionn and then

sftp> ls -l

rw-r--r--    1 530     530           36 Feb 11 08:21 test.txt

sftp> ls -l test.txt

-rw-r--r--    0 530     530           36 Feb 11 09:21 test.txt

Does someone have an explanation for the different time stamps?

thx Antje

  • Interesting... if you're using the OpenSSH implementation, then it appears to have two different ls routines depending on whether a path argument is given (do_ls_dir and do_globbed_ls). I wonder if there's a difference in locale handling between the two? Commented Feb 15, 2021 at 14:19
  • 1
    Could you please double check your transcript? There seems to be a chraracter missing from the permission string. If this missing character is a d character, then the text.txt name in the first half of the output is a directory, containing a file that is listed with the second command. That is, you have ./test.txt/test.txt.
    – Kusalananda
    Commented Feb 15, 2021 at 18:02
  • Are you working from two different accounts (Anjtje and user456231)? If so, please check here on how to merge these.
    – AdminBee
    Commented Feb 16, 2021 at 10:00
  • I rolled back the most recent edit from user456231 as only the original user could possibly know what the correct transcript should look like.
    – Kusalananda
    Commented Feb 16, 2021 at 11:14
  • 2
    Does this answer your question? Different timestamps in SFTP "ls -l" vs. "ls -lh" Commented Nov 16, 2021 at 9:57


You must log in to answer this question.

Browse other questions tagged .