{
    "content": [
        {
            "type": "text",
            "text": "# xdg-user-dirs-update (man)\n\n## NAME\n\nxdg-user-dirs-update - Update XDG user dir configuration\n\n## SYNOPSIS\n\nxdg-user-dirs-update [OPTION...] [--set NAME PATH...]\n\n## DESCRIPTION\n\nxdg-user-dirs-update updates the current state of the users user-dirs.dir. If none existed\nbefore then one is created based on the system default values, or falling back to the old\nnon-translated filenames if such directories exists. The list of old directories used are:\n~/Desktop, ~/Templates and ~/Public.\n\n## TLDR\n\n> Update XDG user directories.\n\n- Change XDG's DESKTOP directory to the specified directory:\n  `xdg-user-dirs-update --set DESKTOP \"/{{path/to/directory}}\"`\n- Create any missing directories:\n  `xdg-user-dirs-update --force`\n- Write the result to the specified dry-run-file instead of the `user-dirs.dirs` file:\n  `xdg-user-dirs-update --dummy-output \"{{path/to/dry_run_file}}\" --set {{xdg_user_directory}} \"/{{path/to/directory}}\"`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (2 subsections)\n- **FILES**\n- **ENVIRONMENT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "xdg-user-dirs-update",
        "section": "",
        "mode": "man",
        "summary": "xdg-user-dirs-update - Update XDG user dir configuration",
        "synopsis": "xdg-user-dirs-update [OPTION...] [--set NAME PATH...]",
        "tldr_summary": "Update XDG user directories.",
        "tldr_examples": [
            {
                "description": "Change XDG's DESKTOP directory to the specified directory",
                "command": "xdg-user-dirs-update --set DESKTOP \"/{{path/to/directory}}\""
            },
            {
                "description": "Create any missing directories",
                "command": "xdg-user-dirs-update --force"
            },
            {
                "description": "Write the result to the specified dry-run-file instead of the `user-dirs.dirs` file",
                "command": "xdg-user-dirs-update --dummy-output \"{{path/to/dry_run_file}}\" --set {{xdg_user_directory}} \"/{{path/to/directory}}\""
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Print help output and exit."
            },
            {
                "flag": "",
                "long": "--force",
                "arg": null,
                "description": "Update existing user-dirs.dir, but force a full reset. This means: Don't reset nonexisting directories to HOME, rather recreate the directory. Never use backwards compatible non-translated names. Always recreate user-dirs.locale. --dummy-output PATH Write the configuration to PATH instead of the default configuration file. Also, no directories are created. --set NAME PATH Sets the XDG user dir with the given name. NAME should be one of the following: DESKTOP DOWNLOAD TEMPLATES PUBLICSHARE DOCUMENTS MUSIC PICTURES VIDEOS PATH must be an absolute path, e.g. $HOME/Some/Directory."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "xdg-user-dir",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xdg-user-dir/1/json"
            },
            {
                "name": "user-dirs.dirs",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/user-dirs.dirs/5/json"
            },
            {
                "name": "user-dirs.defaults",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/user-dirs.defaults/5/json"
            },
            {
                "name": "user-dirs.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/user-dirs.conf/5/json"
            },
            {
                "name": "XDG-USER-DIRS-UPD",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/XDG-USER-DIRS-UPD/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "--force",
                        "lines": 23,
                        "long": "--force"
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "xdg-user-dirs-update - Update XDG user dir configuration\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "xdg-user-dirs-update [OPTION...] [--set NAME PATH...]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "xdg-user-dirs-update updates the current state of the users user-dirs.dir. If none existed\nbefore then one is created based on the system default values, or falling back to the old\nnon-translated filenames if such directories exists. The list of old directories used are:\n~/Desktop, ~/Templates and ~/Public.\n\nIf an old configuration exists it is updated with any new default directories. Additionally,\nany configured directories that point to non-existing locations are reset by pointing then to\nthe users home directory. This typically happens when the users removed the directory, so\nthey likely don't want to use it anymore.\n\nOn the first run a user-dirs.locale file is created containing the locale that was used for\nthe translation. This is used later by GUI tools like xdg-user-dirs-gtk-update to detect if\nthe locale was changed, letting you to migrate from the old names.\n\nxdg-user-dirs-update is normally run automatically at the start of a user session to update\nthe XDG user dirs according to the users locale.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The following options are understood:\n",
                "subsections": [
                    {
                        "name": "--help",
                        "content": "Print help output and exit.\n",
                        "long": "--help"
                    },
                    {
                        "name": "--force",
                        "content": "Update existing user-dirs.dir, but force a full reset. This means: Don't reset\nnonexisting directories to HOME, rather recreate the directory. Never use backwards\ncompatible non-translated names. Always recreate user-dirs.locale.\n\n--dummy-output PATH\nWrite the configuration to PATH instead of the default configuration file. Also, no\ndirectories are created.\n\n--set NAME PATH\nSets the XDG user dir with the given name.\n\nNAME should be one of the following:\nDESKTOP\nDOWNLOAD\nTEMPLATES\nPUBLICSHARE\nDOCUMENTS\nMUSIC\nPICTURES\nVIDEOS\n\nPATH must be an absolute path, e.g.  $HOME/Some/Directory.\n",
                        "long": "--force"
                    }
                ]
            },
            "FILES": {
                "content": "The XDG user dirs configuration is stored in the user-dirs.dir file in the location pointed\nto by the XDGCONFIGHOME environment variable.\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "The XDGCONFIGHOME environment variable determines where the user-dirs.dirs file is located.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user-dirs.conf(5).\n\n\n\nXDG                                                                             XDG-USER-DIRS-UPD(1)",
                "subsections": []
            }
        }
    }
}