Skip to content

Issue with ls but not sure if intended #3682

Answered by rimrul
ykh-1992 asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I understand, ls should only list things, not download them.

Well, it's more complicated that that. ls is supposed to show you information about files. At its most basic, that's the names of the files in the current directory. And it needs to gather this information before it can display it. Since ls is designed for unix systems it uses stat() (or similar) for that. stat() provides a bunch of info about a file, including its size and the time it was last modified.

But Windows doesn't have a direct stat() equivalent, so the MSYS2 runtime has to provide a stat() implementation that cobbles together the required information from various Windows functions. One or more of them requ…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ykh-1992
Comment options

@dscho
Comment options

Answer selected by ykh-1992
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants