TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Power of the XDG Base Directory Specification (2019)

3 pointsby bfmalmost 3 years ago

1 comment

bfmalmost 3 years ago
How prevalent is XDG? The only place I have seen it used is on [Caddy&#x27;s Dockerfile].<p>The defaults do not seem to match what the [Filesystem Hierarchy Standard] is proposing, but they do seem reasonable:<p><pre><code> # user data (&#x2F;usr&#x2F;share) XDG_DATA_HOME=&quot;${XDG_DATA_HOME:-$HOME&#x2F;.local&#x2F;share}&quot; # config files (&#x2F;etc) XDG_CONFIG_HOME=&quot;${XDG_CONFIG_HOME:-$HOME&#x2F;.config}&quot; # cache files (&#x2F;usr&#x2F;share) XDG_CACHE_HOME=&quot;${XDG_CACHE_HOME:-$HOME&#x2F;.cache}&quot; # state files (&#x2F;var&#x2F;lib) XDG_STATE_HOME=&quot;${XDG_STATE_HOME:-$HOME&#x2F;.local&#x2F;state}&quot; [Caddy&#x27;s Dockerfile]: https:&#x2F;&#x2F;github.com&#x2F;caddyserver&#x2F;caddy-docker&#x2F;blob&#x2F;master&#x2F;Dockerfile.tmpl#L40 [Filesystem Hierarchy Standard]: https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Filesystem_Hierarchy_Standard</code></pre>