Easy Tutorial
❮ Linux Comm Modinfo Linux Comm Restore ❯

Linux col Command

Linux Command Manual

The Linux col command is used to filter control characters.

In many UNIX documentation files, there are RLF control characters. When we use the shell special characters ">" and ">>" to output the content of the documentation files into plain text files, control characters become garbled. The col command can effectively filter out these control characters.

Syntax

col [-bfx][-l<buffer columns>]

Parameters:

Example

Below is an example using the col command with the man command's help documentation.

Save the man command's help documentation as man_help, using the -b parameter to filter all control characters. Use the following command in the terminal:

man man | col -b > man_help

Note: The "|" is used to create a pipeline, converting the output of the man command into input data for the col command.

Linux Command Manual

❮ Linux Comm Modinfo Linux Comm Restore ❯