> For the complete documentation index, see [llms.txt](https://polytech-astana.gitbook.io/elektronnyi-uchebnik-po-osnovam-linux/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polytech-astana.gitbook.io/elektronnyi-uchebnik-po-osnovam-linux/rabota-s-tekstom/prosmotr-failov-v-terminale/prosmotr-s-pomoshyu-less-i-more/poisk-v-komande-less.md).

# Поиск в команде less

Есть два способа поиска в `less`команде: поиск вперед или назад от вашего текущего положения.

Чтобы начать поиск с вашего текущего положения, используйте косую черту **/** . Затем введите текст или шаблон для соответствия и нажмите клавишу **Enter** .

```
Abdul
Abdul's
Abe
/frog
```

Если совпадение найдено, то курсор перемещается в документе на совпадение. Например, на следующем рисунке в файле искали выражение «лягушка» `words`:

```
bullfrog
bullfrog's
bullfrogs
bullheaded
bullhorn
bullhorn's
```

Обратите внимание, что «лягушка» не обязательно должна быть отдельным словом. Также обратите внимание, что пока `less`команда перемещалась к первому совпадению с текущей позиции, все совпадения были выделены.

Если совпадений с вашей текущей позицией не найдено, в последней строке экрана появится сообщение `Pattern not found`:

```
Pattern not found (press RETURN)
```

Для поиска в обратном направлении от текущего положения нажмите знак вопроса **?** , затем введите текст или шаблон для сопоставления и нажмите клавишу **Enter** . Курсор перемещается назад к первому совпадению, которое он может найти, или сообщает, что образец не может быть найден.

Если в результате поиска можно найти более одного совпадения, используйте клавишу **n** , чтобы переместить следующее совпадение, и используйте комбинацию клавиш **Shift** + **N** , чтобы перейти к предыдущему совпадению.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://polytech-astana.gitbook.io/elektronnyi-uchebnik-po-osnovam-linux/rabota-s-tekstom/prosmotr-failov-v-terminale/prosmotr-s-pomoshyu-less-i-more/poisk-v-komande-less.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
