nerdexam
LPI

101-400 · Question #426

When in Normal mode in vi, which character can be used to begin a reverse search of the text?

The correct answer is A. ? See the full explanation below for the reasoning.

Question

When in Normal mode in vi, which character can be used to begin a reverse search of the text?

Options

  • A?
  • B/
  • CF
  • Dr

How the community answered

(25 responses)
  • A
    84% (21)
  • B
    4% (1)
  • C
    8% (2)
  • D
    4% (1)

Community Discussion

7
Thiago A.Thiago A.Dec 9, 2025

A is correct. In vi Normal mode, pressing ? drops you into a reverse (upward) search prompt, while / searches forward, so ? is the one you want when you need to hunt backward through the buffer.

13
Lena V.Lena V.Nov 22, 2025

Thought / was reverse until I remembered ? searches backward, / goes forward.

4
Fatima Z.Fatima Z.Dec 27, 2025

A is your answer, no contest. In vi Normal mode, the question mark kicks off a reverse search, meaning it hunts BACKWARD through your file, while the forward slash searches downward, so just picture it this way: the question mark leans back like it is second-guessing itself, and that lean is your cue that it goes in reverse. Think "Q for Questioning the Past" since ? looks like a Q that lost its bottom loop, always reaching back. Once you nail that image, you will never mix up / and ? on exam day or in real terminal life.

3
Nina C.Nina C.Dec 30, 2025

That Q mnemonic is clever, and once you lock in / vs. ?, just remember that lowercase n repeats whichever direction you already picked and uppercase N reverses it, so you are really getting four navigation moves out of two memorized keys.

0
Devraj B.Devraj B.Nov 26, 2025

This one trips people up because vi gives you two search directions and each has its own trigger key, and they are mirror images of each other. The forward search starts with the slash, but the reverse search, meaning it walks backward from your cursor position toward the top of the file, starts with the question mark. Option C is a trap because capital F does move backward, but only to find a single character on the current line, which is a very different operation from a full text search. The exam, mapped to LPI 103.8 on basic file editing with a weight of 3, expects you to know both directions cold. Here is what I want to ask you: after you type your search character and enter a pattern and press Enter, do you know which key repeats the search in the same direction, and which one reverses it to go the opposite way? That distinction shows up in real exam items and knowing it tells me whether you have the full picture or just half of it.

1
Nina C.Nina C.Dec 12, 2025

Pretty sure it is C, because F moves you backward through the file.

0
Fatima Z.Fatima Z.Dec 15, 2025

Hey Nina, easy mix-up but think of it this way: F is for Forward, so F pages you ahead in the file, not back. That makes A the right pick here.

0
Full 101-400 Practice