freeze
Freeze XFS filesystem
TLDR
Generate an image of code based on a file
Specify the output path
Generate an image of terminal output
Interactively customize the output image
Select a theme for syntax highlighting
Use a base configuration template
Capture a specific range of line numbers
Show line numbers
SYNOPSIS
freeze [delay]
PARAMETERS
[delay]
Optional seconds to wait before freezing the display (defaults to 1). Specify 0 to freeze immediately.
DESCRIPTION
The freeze command, part of the moreutils package, temporarily halts the updating of the terminal display to prevent scrolling. This is particularly useful when running commands that produce lengthy output, ensuring important information remains visible at the top of the screen.
By default, freeze waits 1 second before activating the freeze. During this period, normal output continues. Once frozen, the screen stops scrolling regardless of further output, until any key is pressed, at which point normal behavior resumes.
This tool is handy for interactive sessions, debugging scripts with verbose output, or protecting prompts in shared terminals. It works on terminals supporting escape sequences like xterm, gnome-terminal, and similar, but may not function in all environments such as screen multiplexers or minimal consoles.
Installation is typically via package managers: apt install moreutils on Debian/Ubuntu or yum install moreutils on RHEL-based systems. It's lightweight and non-intrusive, making it a quick addition to shell scripts or aliases for output protection.
CAVEATS
Not a core Linux utility; requires moreutils package. Ineffective in some terminals or multiplexers like tmux/screen. Does not pause command execution, only display updates.
EXAMPLES
freeze # Waits 1s then freezes
freeze 0 # Freeze immediately
ls -la | freeze 3 # Freeze after 3s for directory listing
MECHANISM
Sends terminal escape sequence \033[?47h to switch to alternate screen, freezing scroll until keypress restores it.
HISTORY
Developed by Joey Hess as part of the moreutils collection, first released around 2006. Evolved with contributions for better terminal compatibility; widely available in major distros since 2010.


