Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • However, some software might use a socket or link of some odd type named .config ... Commented Apr 9, 2018 at 2:12
  • 1
    @rackandboneman stat from GNU coreutils on my system happily reports a socket as a socket. Symlinks are reported as symbolic link. Hardlinks are indistinguishable from "regular" files and are reported as regular file (that's what they are, after all), except that the links count is >1. Commented Apr 9, 2018 at 9:29
  • "of some odd type" - I was referring to the other dozens of sockety or linky types found in that super-verbose section of C code (there certainly is a good reason for not just indexing an array of strings with the file type number ... I guess...) :) Commented Apr 9, 2018 at 12:55
  • @rackandboneman Base POSIX doesn't provide any way to extract a "file type number" from a stat structure, only the S_ISxxx() macros. Some Unixes offer a set of "XSI" extensions that include a way to do that, but coreutils tries not to depend on XSI, or did the last time I looked anyway. Commented Apr 12, 2018 at 14:46
  • Ahhh OK. I was kind of mis-assuming coreutils to be more GNU/linux centric that it is meant to be :) Commented Apr 12, 2018 at 18:40