nerdexam
GIAC

GCIH · Question #426

Unix files beginning with which of the following characters are considered hidden?

The correct answer is D. .. In Unix and Linux systems, files and directories whose names begin with a period are treated as hidden and are not displayed by default in directory listings.

Reconnaissance, Scanning, and Enumeration

Question

Unix files beginning with which of the following characters are considered hidden?

Options

  • A!
  • B$
  • C?
  • D.

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    4% (1)
  • D
    92% (23)

Why each option

In Unix and Linux systems, files and directories whose names begin with a period are treated as hidden and are not displayed by default in directory listings.

A!

The exclamation mark has no special hidden-file meaning in Unix; it is used in shell history expansion.

B$

The dollar sign is a shell metacharacter used to reference variable values, not to denote hidden files.

C?

The question mark is a shell glob wildcard matching any single character, not a hidden-file prefix.

D.Correct

The Unix convention treats any file or directory name beginning with a dot (.) as hidden. Tools like 'ls' omit these entries unless the '-a' flag is used, and this behavior is enforced by the shell and filesystem utilities rather than a permission setting.

Concept tested: Unix hidden file naming convention

Source: https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html

Topics

#Unix hidden files#dot files#file system#enumeration

Community Discussion

No community discussion yet for this question.

Full GCIH Practice