# man > col(1)

---
type: CommandReference
command: col
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `col` — Filter reverse line feeds from input.
- `col -x` — Filter reverse line feeds and output with spaces instead of tabs.
- `col -b` — Remove backspaces, output only the last character written to each position.
- `col -l 128` — Specify a buffer size with a specific number of lines.
- `man ls | col -b | less` — Format a manual page for viewing with `less`.
- `cat input.txt | col -x > output.txt` — Process a file with reverse line feeds and save the cleaned output.

## Name

`col` — filter reverse line feeds from input.

## Synopsis

`col` [options]

## Description

`col` filters out reverse (and half-reverse) line feeds so the output is in the correct order, with only forward and half-forward line feeds. It also replaces whitespace with tabs where possible. `col` reads from standard input and writes to standard output.

## Options

- `-b, --no-backspaces` — Do not output backspaces; print only the last character written to each column position.
- `-f, --fine` — Permit half-forward line feeds. Normally characters destined for a half-line boundary are printed on the following line.
- `-h, --tabs` — Output tabs instead of multiple spaces.
- `-l, --lines` *number* — Buffer at least *number* lines in memory. Default is 128.
- `-p, --pass` — Force unknown control sequences to be passed through unchanged. Normally `col` filters out unrecognized control sequences.
- `-x, --spaces` — Output multiple spaces instead of tabs.
- `-V, --version` — Display version information and exit.
- `-H, --help` — Display help text and exit.

## Notes

### Recognized Control Sequences

| Sequence | Decimal | Action |
|----------|---------|--------|
| `ESC-7` | 27 55 | Reverse line feed |
| `ESC-8` | 27 56 | Half reverse line feed |
| `ESC-9` | 27 57 | Half forward line feed |
| backspace | 8 | Moves back one column; ignored in first column |
| newline | 10 | Forward line feed; also does carriage return |
| carriage return | 13 | |
| shift in | 15 | Shift to normal character set |
| shift out | 14 | Shift to alternate character set |
| space | 32 | Moves forward one column |
| tab | 9 | Moves forward to next tab stop |
| vertical tab | 11 | Reverse line feed |

All unrecognized control characters and escape sequences are discarded. `col` keeps track of character set and ensures correct output. If the input attempts to back up to the last flushed line, a warning message is displayed.

## Examples

shell
# Filter reverse line feeds from a file
cat input.txt | col > output.txt

# Convert tabs to spaces
col -x < input.txt > output.txt

# Remove backspaces and view man page
man ls | col -b | less

# Specify buffer size
col -l 256 < input.txt > output.txt
## Conformance

`col` conforms to the Single UNIX Specification, Version 2. The `-l` option is an extension.

## See Also

- [expand(1)](http://localhost/phpMan.php/man/expand/1/markdown)
- [nroff(1)](http://localhost/phpMan.php/man/nroff/1/markdown)
- [tbl(1)](http://localhost/phpMan.php/man/tbl/1/markdown)

## History

A `col` command appeared in Version 6 AT&T UNIX.

## Reporting Bugs

Report bugs at <https://github.com/karelzak/util-linux/issues>.

## Availability

The `col` command is part of the util-linux package, which can be downloaded from <https://www.kernel.org/pub/linux/utils/util-linux/>.