$tail
Output the last part (bottom lines) of files or stream real-time logs.
tail [OPTIONS] [FILE...]Попробуйте в интерактивной песочнице
Клиентская симуляция без установки с мгновенным результатом.
Обзор и принцип работы
`tail` displays the final lines of files (default: 10 lines). With the `-f` (follow) flag, `tail` remains open and continuously streams new log lines to your terminal in real-time as they are written by web servers, databases, and background services.
Основные флаги и параметры команды
| Flag / Option | Description |
|---|---|
| -n [NUM] | Output the last NUM lines instead of the default 10. |
| -f | Follow mode; continuously output appended data as the file grows. |
| -F | Follow mode with retry; keeps tracking file even if rotated or recreated. |
Практические примеры использования
tail -n 10 /var/log/auth.logPrints the most recent authentication attempts.
Похожие команды Linux
Поиск текстовых шаблонов и регулярных выражений внутри файлов и потоков данных.
Чтение и объединение содержимого файлов с выводом в терминал.
Output the first part (top lines) of text files.
Print newline, word, and byte counts for files.
Print text strings or write data to files using shell redirection.
Stream editor for filtering and transforming text using pattern substitutions.