lesspipe
Filter/format file contents for 'less' display
SYNOPSIS
lesspipe [file]
PARAMETERS
file
File to preprocess for viewing in less
DESCRIPTION
lesspipe (or lesspipe.sh) is an input preprocessor for less that enables less to view non-text files in a human-readable format. It automatically detects file types and applies appropriate transformations, allowing less to display archives, compressed files, PDFs, images, and other binary formats as text.
CAVEATS
Requires external programs to handle specific file types (e.g., tar, gzip, pdftotext). Not all file types are supported; depends on available tools. Some implementations vary between distributions.
ENABLING LESSPIPE
Set the LESSOPEN environment variable to enable: export LESSOPEN='|lesspipe %s'. This causes less to pipe files through lesspipe before displaying.
SUPPORTED FORMATS
Common supported formats include: compressed files (.gz, .bz2, .xz), archives (.tar, .zip, .rar), documents (.pdf, .doc), images (metadata), and source code with syntax highlighting.


