nerdexam
GIAC

GCFA · Question #272

You want to change the attribute of a file named ACE.TXT to Hidden. Which command line will enable you to set the attribute?

The correct answer is C. ATTRIB ACE.TXT +H. The Windows ATTRIB command uses a plus sign (+) to set an attribute and H to designate the hidden attribute, making +H the correct syntax to hide a file.

File System & Registry Forensics

Question

You want to change the attribute of a file named ACE.TXT to Hidden. Which command line will enable you to set the attribute?

Options

  • AATTRIB ACE.TXT -H
  • BATTRIB ACE.TXT /HR
  • CATTRIB ACE.TXT +H
  • DATTRIB ACE.TXT /H

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    78% (35)
  • D
    13% (6)

Why each option

The Windows ATTRIB command uses a plus sign (+) to set an attribute and H to designate the hidden attribute, making +H the correct syntax to hide a file.

AATTRIB ACE.TXT -H

ATTRIB ACE.TXT -H uses the minus sign operator which removes the hidden attribute from the file rather than setting it.

BATTRIB ACE.TXT /HR

ATTRIB ACE.TXT /HR is not a valid ATTRIB syntax - the command does not use forward-slash flags or the R suffix for the hidden attribute.

CATTRIB ACE.TXT +HCorrect

ATTRIB ACE.TXT +H follows the correct Windows ATTRIB syntax where + adds the specified attribute and H targets the hidden attribute flag, resulting in ACE.TXT being marked as hidden.

DATTRIB ACE.TXT /H

ATTRIB ACE.TXT /H is not valid ATTRIB syntax - attributes are toggled with + or - prefixes, not forward-slash flag notation.

Concept tested: Windows ATTRIB command syntax for setting file attributes

Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/attrib

Topics

#ATTRIB command#file attributes#hidden files#Windows CLI

Community Discussion

No community discussion yet for this question.

Full GCFA Practice