nerdexam
CompTIA

LX0-104 · Question #370

Which command will list all of the extended attributes on the file afile.txt along with the values?

The correct answer is D. getfattr dump afile.txt. This question asks for the getfattr command that displays all extended attributes of a file along with their values.

Administrative Tasks

Question

Which command will list all of the extended attributes on the file afile.txt along with the values?

Options

  • Agetfattr all afile.txt
  • Bgetfattr afile.txt
  • Cgetfattr list afile.txt
  • Dgetfattr dump afile.txt

How the community answered

(57 responses)
  • A
    7% (4)
  • B
    2% (1)
  • C
    4% (2)
  • D
    88% (50)

Why each option

This question asks for the `getfattr` command that displays all extended attributes of a file along with their values.

Agetfattr all afile.txt

`all` is not a recognized option for `getfattr` to display all attributes and their values.

Bgetfattr afile.txt

When `getfattr` is run without options like `-n` or `-d`, it typically lists only the names of the attributes, not their values.

Cgetfattr list afile.txt

`list` is not a valid option for `getfattr` to display attribute values; the `-l` or `--list` option lists only attribute names.

Dgetfattr dump afile.txtCorrect

The `getfattr --dump` (or `-d`) option is specifically designed to list all extended attributes along with their values for the specified file in a format that includes both the attribute name and its content.

Concept tested: Listing Linux Extended Attributes

Source: https://linux.die.net/man/1/getfattr

Topics

#Extended Attributes#getfattr#xattrs

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice