nerdexam
Linux_Foundation

LFCS · Question #704

Which command will print out the attributes of the file foobar?

The correct answer is B. Isattr foobar. The lsattr command is specifically designed to display the extended attributes of files on Linux filesystems like ext2, ext3, and ext4.

Submitted by skyler.x· Apr 18, 2026Essential Commands

Question

Which command will print out the attributes of the file foobar?

Options

  • AIs-attrfoobar
  • BIsattr foobar
  • Cprintattr foobar
  • Dfileattr foobar

How the community answered

(46 responses)
  • A
    2% (1)
  • B
    89% (41)
  • C
    2% (1)
  • D
    7% (3)

Why each option

The `lsattr` command is specifically designed to display the extended attributes of files on Linux filesystems like ext2, ext3, and ext4.

AIs-attrfoobar

`ls-attrfoobar` is not a valid command; the hyphen is generally used for options, not as part of the command name.

BIsattr foobarCorrect

The `lsattr` command is the standard utility in Linux to list the file attributes, such as immutable or append-only flags, set on files within ext2/ext3/ext4 filesystems. When used with a filename like `foobar`, it will print its attributes if any are set.

Cprintattr foobar

`printattr` is not a standard Linux command for displaying file attributes.

Dfileattr foobar

`fileattr` is not a standard Linux command for displaying file attributes.

Concept tested: Listing Linux file attributes

Source: https://man7.org/linux/man-pages/man1/lsattr.1.html

Topics

#file attributes#lsattr command#filesystem#Linux commands

Community Discussion

No community discussion yet for this question.

Full LFCS Practice