Online Linux Terminal Logo
OnlineLinuxTerminal
Обработка текстаCLI Manual

$tail

Output the last part (bottom lines) of files or stream real-time logs.

Синтаксис командыPOSIX Standard
tail [OPTIONS] [FILE...]
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

`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 / OptionDescription
-n [NUM]Output the last NUM lines instead of the default 10.
-fFollow mode; continuously output appended data as the file grows.
-FFollow mode with retry; keeps tracking file even if rotated or recreated.

Практические примеры использования

#1Inspect last 10 lines of authentication logs
tail -n 10 /var/log/auth.log

Prints the most recent authentication attempts.