Different timestamps between ls and ls * commands with sftp
Issue
In the same sftp session, there are different timestamps of the same file, according to the input commands
This is an example:
sftp> ls -la
-rw-rw-r-- 1 admin admin 0 Apr 11 04:54 testfile_Us_Ny.txt
---> show the timestamp of the file, referred at the time zone of the server.
sftp> ls -la *
-rw-rw-r-- 0 1000 1000 0 Apr 11 17:54 testfile_Us_Ny.txt
---> show the the timestamp of the file, referred at the the local time zone of the client.
Additional Note
In the output of the la -al *
command, in addition of the time stamp of the file, the uid and gid are in the number format ( instead of name printed when * argument is used), and a error about the number of the link of the file.
This issue is tracked by this bugzilla ticket: sftp UID/GID output issue about arguments in the command line
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- openssh-clients
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.