UNEXPAND(1) General Commands Manual UNEXPAND(1)

unexpand - Convert blanks in each FILE to tabs, writing to standard output. With no FILE, or when FILE is -, read standard input.

unexpand [OPTION]... [FILE]...

Convert blanks in each FILE to tabs, writing to standard output. With no FILE, or when FILE is -, read standard input.

convert all blanks, instead of just initial blanks
convert only leading sequences of blanks (overrides -a)
use comma separated LIST of tab positions or have tabs N characters apart instead of 8 (enables -a)
interpret input file as 8-bit ASCII rather than UTF-8
Print help
Print version

v(uutils coreutils) 0.11.0

2026-09-01