{
    "content": [
        {
            "type": "text",
            "text": "# GETFATTR (man)\n\n## NAME\n\ngetfattr - get extended attributes of filesystem objects\n\n## SYNOPSIS\n\ngetfattr [-hRLP] -n name [-e en] pathname...\ngetfattr [-hRLP] -d [-e en] [-m pattern] pathname...\n\n## DESCRIPTION\n\nFor  each file, getfattr displays the file name, and the set of extended attribute names (and\noptionally values) which are associated with that file. Per default only  attributes  in  the\nuser namespace are displayed, see -m.\n\n## TLDR\n\n> Display file names and extended attributes.\n\n- Retrieve all extended attributes of a file and display them in a detailed format:\n  `getfattr {{-d|--dump}} {{path/to/file}}`\n- Get a specific attribute of a file:\n  `getfattr {{-n|--name}} user.{{attribute_name}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (12 subsections)\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "GETFATTR",
        "section": "",
        "mode": "man",
        "summary": "getfattr - get extended attributes of filesystem objects",
        "synopsis": "getfattr [-hRLP] -n name [-e en] pathname...\ngetfattr [-hRLP] -d [-e en] [-m pattern] pathname...",
        "tldr_summary": "Display file names and extended attributes.",
        "tldr_examples": [
            {
                "description": "Retrieve all extended attributes of a file and display them in a detailed format",
                "command": "getfattr {{-d|--dump}} {{path/to/file}}"
            },
            {
                "description": "Get a specific attribute of a file",
                "command": "getfattr {{-n|--name}} user.{{attribute_name}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-n",
                "long": "--name",
                "arg": null,
                "description": "Dump the value of the named extended attribute."
            },
            {
                "flag": "-d",
                "long": "--dump",
                "arg": null,
                "description": "Dump the values of all matched extended attributes."
            },
            {
                "flag": "-e",
                "long": "--encoding",
                "arg": null,
                "description": "Encode values after retrieving them. Valid values of en are \"text\", \"hex\", and \"base64\". Values encoded as text strings are enclosed in double quotes (\"), while strings encoded as hexadecimal and base64 are prefixed with 0x and 0s, respectively."
            },
            {
                "flag": "-h",
                "long": "--no-dereference",
                "arg": null,
                "description": "Do not dereference symlinks. Instead of the file a symlink refers to, the symlink itself is examined. Unless doing a logical (-L) traversal, do not traverse symlinks to directo‐ ries."
            },
            {
                "flag": "-m",
                "long": "--match",
                "arg": null,
                "description": "Only include attributes with names matching the regular expression pattern. The default value for pattern is \"^user\\\\.\", which includes all the attributes in the user namespace. Specify \"-\" for including all attributes. Refer to attr(5) for a more detailed discus‐ sion of namespaces."
            },
            {
                "flag": "",
                "long": "--absolute-names",
                "arg": null,
                "description": "Do not strip leading slash characters ('/'). The default behaviour is to strip leading slash characters."
            },
            {
                "flag": "",
                "long": "--only-values",
                "arg": null,
                "description": "Dump out the raw extended attribute value(s) without encoding them."
            },
            {
                "flag": "-R",
                "long": "--recursive",
                "arg": null,
                "description": "List the attributes of all files and directories recursively."
            },
            {
                "flag": "-L",
                "long": "--logical",
                "arg": null,
                "description": "Logical walk, follow symbolic links to directories. The default behaviour is to follow symbolic link arguments unless --no-dereference is given, and to skip symbolic links en‐ countered in subdirectories. Only effective in combination with -R."
            },
            {
                "flag": "-P",
                "long": "--physical",
                "arg": null,
                "description": "Physical walk, do not follow symbolic links to directories. This also skips symbolic link arguments. Only effective in combination with -R."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print the version of getfattr and exit."
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Print help explaining the command line options. -- End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "setfattr",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/setfattr/1/json"
            },
            {
                "name": "attr",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/attr/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-n --name",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--name"
                    },
                    {
                        "name": "-d --dump",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--dump"
                    },
                    {
                        "name": "-e --encoding",
                        "lines": 4,
                        "flag": "-e",
                        "long": "--encoding"
                    },
                    {
                        "name": "-h --no-dereference",
                        "lines": 4,
                        "flag": "-h",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "-m --match",
                        "lines": 5,
                        "flag": "-m",
                        "long": "--match"
                    },
                    {
                        "name": "--absolute-names",
                        "lines": 3,
                        "long": "--absolute-names"
                    },
                    {
                        "name": "--only-values",
                        "lines": 2,
                        "long": "--only-values"
                    },
                    {
                        "name": "-R --recursive",
                        "lines": 2,
                        "flag": "-R",
                        "long": "--recursive"
                    },
                    {
                        "name": "-L --logical",
                        "lines": 4,
                        "flag": "-L",
                        "long": "--logical"
                    },
                    {
                        "name": "-P --physical",
                        "lines": 3,
                        "flag": "-P",
                        "long": "--physical"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "--help",
                        "lines": 5,
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "getfattr - get extended attributes of filesystem objects\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "getfattr [-hRLP] -n name [-e en] pathname...\ngetfattr [-hRLP] -d [-e en] [-m pattern] pathname...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "For  each file, getfattr displays the file name, and the set of extended attribute names (and\noptionally values) which are associated with that file. Per default only  attributes  in  the\nuser namespace are displayed, see -m.\n\nThe output format of getfattr -d is as follows:\n1:  # file: somedir/\n2:  user.name0=\"value0\"\n3:  user.name1=\"value1\"\n4:  user.name2=\"value2\"\n5:  ...\n\nLine  1  identifies  the file name for which the following lines are being reported.  The re‐\nmaining lines (lines 2 to 4 above) show the name and value pairs associated with  the  speci‐\nfied file.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-n --name",
                        "content": "Dump the value of the named extended attribute.\n",
                        "flag": "-n",
                        "long": "--name"
                    },
                    {
                        "name": "-d --dump",
                        "content": "Dump the values of all matched extended attributes.\n",
                        "flag": "-d",
                        "long": "--dump"
                    },
                    {
                        "name": "-e --encoding",
                        "content": "Encode values after retrieving them.  Valid values of en are \"text\", \"hex\", and \"base64\".\nValues encoded as text strings are enclosed in double quotes (\"), while  strings  encoded\nas hexadecimal and base64 are prefixed with 0x and 0s, respectively.\n",
                        "flag": "-e",
                        "long": "--encoding"
                    },
                    {
                        "name": "-h --no-dereference",
                        "content": "Do  not dereference symlinks. Instead of the file a symlink refers to, the symlink itself\nis examined.  Unless doing a logical (-L) traversal, do not traverse symlinks to directo‐\nries.\n",
                        "flag": "-h",
                        "long": "--no-dereference"
                    },
                    {
                        "name": "-m --match",
                        "content": "Only  include attributes with names matching the regular expression pattern.  The default\nvalue for pattern is \"^user\\\\.\", which includes all the attributes in the user namespace.\nSpecify  \"-\"  for including all attributes.  Refer to attr(5) for a more detailed discus‐\nsion of namespaces.\n",
                        "flag": "-m",
                        "long": "--match"
                    },
                    {
                        "name": "--absolute-names",
                        "content": "Do not strip leading slash characters ('/').  The default behaviour is to  strip  leading\nslash characters.\n",
                        "long": "--absolute-names"
                    },
                    {
                        "name": "--only-values",
                        "content": "Dump out the raw extended attribute value(s) without encoding them.\n",
                        "long": "--only-values"
                    },
                    {
                        "name": "-R --recursive",
                        "content": "List the attributes of all files and directories recursively.\n",
                        "flag": "-R",
                        "long": "--recursive"
                    },
                    {
                        "name": "-L --logical",
                        "content": "Logical  walk,  follow symbolic links to directories.  The default behaviour is to follow\nsymbolic link arguments unless --no-dereference is given, and to skip symbolic links  en‐\ncountered in subdirectories.  Only effective in combination with -R.\n",
                        "flag": "-L",
                        "long": "--logical"
                    },
                    {
                        "name": "-P --physical",
                        "content": "Physical  walk,  do  not  follow symbolic links to directories.  This also skips symbolic\nlink arguments.  Only effective in combination with -R.\n",
                        "flag": "-P",
                        "long": "--physical"
                    },
                    {
                        "name": "--version",
                        "content": "Print the version of getfattr and exit.\n",
                        "long": "--version"
                    },
                    {
                        "name": "--help",
                        "content": "Print help explaining the command line options.\n\n--  End of command line options.  All remaining parameters are  interpreted  as  file  names,\neven if they start with a dash character.\n",
                        "long": "--help"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Andreas  Gruenbacher,  <andreas.gruenbacher@gmail.com>  and  the  SGI  XFS  development team,\n<linux-xfs@oss.sgi.com>.\n\nPlease send your bug reports or comments to <https://savannah.nongnu.org/bugs/?group=attr> or\n<acl-devel@nongnu.org>.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "setfattr(1), attr(5)\n\n\n\nDec 2001                                 Extended Attributes                             GETFATTR(1)",
                "subsections": []
            }
        }
    }
}