{
    "mode": "man",
    "parameter": "COL",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/COL/1/json",
    "generated": "2026-07-05T13:37:13Z",
    "synopsis": "col options",
    "sections": {
        "NAME": {
            "content": "col - filter reverse line feeds from input\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "col options\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "col filters out reverse (and half-reverse) line feeds so the output is in the correct order,\nwith only forward and half-forward line feeds. It also replaces any whitespace characters\nwith tabs where possible. This can be useful in processing the output of nroff(1) and tbl(1).\n\ncol reads from standard input and writes to standard output.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-b --no-backspaces",
                    "content": "Do not output any backspaces, printing only the last character written to each column\nposition.\n",
                    "flag": "-b",
                    "long": "--no-backspaces"
                },
                {
                    "name": "-f --fine",
                    "content": "Permit half-forward line feeds. Normally characters destined for a half-line boundary are\nprinted on the following line.\n",
                    "flag": "-f",
                    "long": "--fine"
                },
                {
                    "name": "-h --tabs",
                    "content": "Output tabs instead of multiple spaces.\n",
                    "flag": "-h",
                    "long": "--tabs"
                },
                {
                    "name": "-l --lines",
                    "content": "Buffer at least number lines in memory. By default, 128 lines are buffered.\n",
                    "flag": "-l",
                    "long": "--lines"
                },
                {
                    "name": "-p --pass",
                    "content": "Force unknown control sequences to be passed through unchanged. Normally col will filter\nout any control sequences other than those recognized and interpreted by itself, which\nare listed below.\n",
                    "flag": "-p",
                    "long": "--pass"
                },
                {
                    "name": "-x --spaces",
                    "content": "Output multiple spaces instead of tabs.\n",
                    "flag": "-x",
                    "long": "--spaces"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-H --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-H",
                    "long": "--help"
                }
            ]
        },
        "CONFORMING TO": {
            "content": "The col utility conforms to the Single UNIX Specification, Version 2. The -l option is an\nextension to the standard.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "The control sequences for carriage motion that col understands and their decimal values are\nlisted in the following table:\n\nESC-7\nreverse line feed (escape then 7)\n\nESC-8\nhalf reverse line feed (escape then 8)\n\nESC-9\nhalf forward line feed (escape then 9)\n",
            "subsections": [
                {
                    "name": "backspace",
                    "content": "moves back one column (8); ignored in the first column\n"
                },
                {
                    "name": "newline",
                    "content": "forward line feed (10); also does carriage return\n"
                },
                {
                    "name": "carriage return",
                    "content": "(13)\n"
                },
                {
                    "name": "shift in",
                    "content": "shift to normal character set (15)\n"
                },
                {
                    "name": "shift out",
                    "content": "shift to alternate character set (14)\n"
                },
                {
                    "name": "space",
                    "content": "moves forward one column (32)\n"
                },
                {
                    "name": "tab",
                    "content": "moves forward to next tab stop (9)\n"
                },
                {
                    "name": "vertical tab",
                    "content": "reverse line feed (11)\n\nAll unrecognized control characters and escape sequences are discarded.\n\ncol keeps track of the character set as characters are read and makes sure the character set\nis correct when they are output.\n\nIf the input attempts to back up to the last flushed line, col will display a warning\nmessage.\n"
                }
            ]
        },
        "HISTORY": {
            "content": "A col command appeared in Version 6 AT&T UNIX.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "expand(1), nroff(1), tbl(1)\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The col command is part of the util-linux package which can be downloaded from Linux Kernel\nArchive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                       COL(1)",
            "subsections": []
        }
    },
    "summary": "col - filter reverse line feeds from input",
    "flags": [
        {
            "flag": "-b",
            "long": "--no-backspaces",
            "arg": null,
            "description": "Do not output any backspaces, printing only the last character written to each column position."
        },
        {
            "flag": "-f",
            "long": "--fine",
            "arg": null,
            "description": "Permit half-forward line feeds. Normally characters destined for a half-line boundary are printed on the following line."
        },
        {
            "flag": "-h",
            "long": "--tabs",
            "arg": null,
            "description": "Output tabs instead of multiple spaces."
        },
        {
            "flag": "-l",
            "long": "--lines",
            "arg": null,
            "description": "Buffer at least number lines in memory. By default, 128 lines are buffered."
        },
        {
            "flag": "-p",
            "long": "--pass",
            "arg": null,
            "description": "Force unknown control sequences to be passed through unchanged. Normally col will filter out any control sequences other than those recognized and interpreted by itself, which are listed below."
        },
        {
            "flag": "-x",
            "long": "--spaces",
            "arg": null,
            "description": "Output multiple spaces instead of tabs."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display version information and exit."
        },
        {
            "flag": "-H",
            "long": "--help",
            "arg": null,
            "description": "Display help text and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "expand",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/expand/1/json"
        },
        {
            "name": "nroff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/nroff/1/json"
        },
        {
            "name": "tbl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tbl/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Filter reverse line feeds from input.",
        "examples": [
            {
                "description": "Filter reverse line feeds from input",
                "command": "{{command}} | col"
            },
            {
                "description": "Filter reverse line feeds and output with spaces instead of tabs",
                "command": "{{command}} | col {{-x|--spaces}}"
            },
            {
                "description": "Remove backspaces, output only the last character written to each position",
                "command": "{{command}} | col {{-b|--no-backspaces}}"
            },
            {
                "description": "Specify a buffer size with a specific number of lines",
                "command": "{{command}} | col {{-l|--lines}} {{num}}"
            },
            {
                "description": "Format a manual page for viewing with `less`",
                "command": "man ls | col {{-b|--no-backspaces}} | less"
            },
            {
                "description": "Process a file with reverse line feeds and save the cleaned output",
                "command": "cat {{path/to/input_file}} | col {{-x|--spaces}} > {{output_file}}"
            }
        ]
    }
}