nerdexam
LPI

010-160 · Question #85

Which command displays file names only and no additional information?

The correct answer is A. ls -a. The ls command without format flags displays only file names, and -a adds hidden files to that output without adding detail columns.

Finding Your Way on a Linux System

Question

Which command displays file names only and no additional information?

Options

  • Als -a
  • Bls -lh
  • Cls -l
  • Dls -alh
  • Els -nl

How the community answered

(42 responses)
  • A
    88% (37)
  • B
    2% (1)
  • C
    5% (2)
  • D
    5% (2)

Why each option

The ls command without format flags displays only file names, and -a adds hidden files to that output without adding detail columns.

Als -aCorrect

The ls -a flag lists all files including hidden files (those prefixed with a dot) but does not enable long format output, so only file names are shown with no permissions, timestamps, or size information. Without the -l flag, ls output remains a simple name listing regardless of other flags like -a.

Bls -lh

The -l and -h flags together produce long format output with human-readable sizes, showing permissions, ownership, size, and timestamps.

Cls -l

The -l flag enables long format output, displaying detailed metadata columns such as permissions, link count, owner, group, size, and modification date.

Dls -alh

Combining -a, -l, and -h produces long format output for all files including hidden ones, showing full metadata alongside each file name.

Els -nl

The -n flag is a variant of long format (-l) that displays numeric UID and GID values instead of names, still showing all detail columns.

Concept tested: Linux ls command output format flags

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

Topics

#ls command#directory listing#command options#file names

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice