LinuxCommandLibrary

yap

TLDR

View file contents

$ yap [file]
copy
View with specific page size
$ yap -[20] [file]
copy
View without screen clearing
$ yap -c [file]
copy
Suppress underline handling
$ yap -u [file]
copy
Start at specific line
$ yap +[100] [file]
copy

SYNOPSIS

yap [-cnuq] [-num] [+command] [file...]

DESCRIPTION

yap (Yet Another Pager) is a text file viewer that displays content one screenful at a time. Its distinguishing feature is bidirectional paging, allowing navigation both forwards and backwards even when reading from standard input.
The pager handles nroff-formatted text, processing underline and bold sequences appropriately for the terminal. It supports searching, marking positions, and various navigation commands similar to other Unix pagers.

PARAMETERS

-num

Set page size to num lines.
-c
Scroll instead of clearing screen for each page.
-u
Suppress underline processing for nroff output.
-n
Display line numbers.
-q
Only exit on explicit quit command.
+command
Execute command on startup.

COMMANDS

SPACE: Display next page.
RETURN: Display next line.
b: Page backwards.
s: Skip lines forward.
f: Skip pages forward.
g: Go to beginning of file.
G: Go to end of file.
/pattern: Search forward for pattern.
?pattern: Search backward for pattern.
n: Repeat last search.
m: Set mark on current page.
': Return to mark.
h: Display help.
q or Q: Quit.

ENVIRONMENT

YAP: Pre-set default flags.
TERM: Terminal type for screen handling.

CAVEATS

Limited availability on modern systems. Most users prefer less or more which offer similar functionality with additional features.

HISTORY

yap was developed for MINIX, Andrew S. Tanenbaum's Unix-like educational operating system. It provided essential paging functionality with the notable addition of backward scrolling, which was not available in the original more command. The less pager later became the standard solution offering similar bidirectional capabilities.

SEE ALSO

less(1), more(1), pg(1), cat(1)

Copied to clipboard