{
    "mode": "man",
    "parameter": "column",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/column/1/json",
    "generated": "2026-09-24T02:54:29Z",
    "synopsis": "column [options] [file ...]",
    "sections": {
        "NAME": {
            "content": "column - columnate lists\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "column [options] [file ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The column utility formats its input into multiple columns. The util support three modes:\n",
            "subsections": [
                {
                    "name": "columns are filled before rows",
                    "content": "This is the default mode (required by backward compatibility).\n"
                },
                {
                    "name": "rows are filled before columns",
                    "content": "This mode is enabled by option -x, --fillrows\n"
                },
                {
                    "name": "table",
                    "content": "Determine the number of columns the input contains and create a table. This mode is\nenabled by option -t, --table and columns formatting is possible to modify by --table-*\noptions. Use this mode if not sure. The output is aligned to the terminal width in\ninteractive mode and the 80 columns in non-interactive mode (see --output-width for more\ndetails).\n\nInput is taken from file, or otherwise from standard input. Empty lines are ignored and all\ninvalid multibyte sequences are encoded by x<hex> convention.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "The argument columns for --table-* options is a comma separated list of the column names as\ndefined by --table-columns, or names defined by --table-column or it’s column number in order\nas specified by input. It’s possible to mix names and numbers. The special placeholder '0'\n(e.g. -R0) may be used to specify all columns and '-1' (e.g. -R -1) to specify the last\nvisible column. It’s possible to use ranges like '1-5' when addressing columns by numbers.\n",
            "subsections": [
                {
                    "name": "-J, --json",
                    "content": "Use JSON output format to print the table, the option --table-columns is required and the\noption --table-name is recommended.\n",
                    "flag": "-J",
                    "long": "--json"
                },
                {
                    "name": "-c, --output-width _",
                    "content": "Output is formatted to a width specified as number of characters. The original name of\nthis option is --columns; this name is deprecated since v2.30. Note that input longer\nthan width is not truncated by default. The default is a terminal width and the 80\ncolumns in non-interactive mode. The column headers are never truncated.\n\nThe placeholder \"unlimited\" (or 0) is possible to use to not restrict output width. This\nis recommended for example when output to the files rather than on terminal.\n",
                    "flag": "-c",
                    "long": "--output-width"
                },
                {
                    "name": "-d, --table-noheadings",
                    "content": "Do not print header. This option allows the use of logical column names on the command\nline, but keeps the header hidden when printing the table.\n",
                    "flag": "-d",
                    "long": "--table-noheadings"
                },
                {
                    "name": "-o, --output-separator _",
                    "content": "Specify the columns delimiter for table output (default is two spaces).\n",
                    "flag": "-o",
                    "long": "--output-separator"
                },
                {
                    "name": "-s, --separator _",
                    "content": "Specify the possible input item delimiters (default is whitespace).\n",
                    "flag": "-s",
                    "long": "--separator"
                },
                {
                    "name": "-t, --table",
                    "content": "Determine the number of columns the input contains and create a table. Columns are\ndelimited with whitespace, by default, or with the characters supplied using the\n--output-separator option. Table output is useful for pretty-printing.\n",
                    "flag": "-t",
                    "long": "--table"
                },
                {
                    "name": "-C, --table-column _",
                    "content": "Define one column by comma separated list of column attributes. This option can be used\nmore than once, every use defines just one column. The properties replace some of\n--table- options. For example --table-column name=FOO,right define one column where text\nis aligned to right. The option is mutually exclusive to --table-columns.\n\nThe currently supported attributes are:\n\nname=string\nSpecifies column name.\n\ntrunc\nThe column text can be truncated when necessary. The same as --table-truncate.\n\nright\nRight align text in the specified columns. The same as --table-right.\n\nwidth=number\nSpecifies column width. The width is used as a hint only. The width is strictly\nfollowed only when strictwidth attribute is used too.\n\nstrictwidth\nStrictly follow column width= setting.\n\nnoextreme\nSpecify columns where is possible to ignore unusually long cells. See\n--table-noextreme for more details.\n\nwrap\nSpecify columns where is possible to use multi-line cell for long text when\nnecessary. See --table-wrap.\n\nhide\nDon’t print specified columns. See --table-hide.\n\njson=type\nDefine column type for JSON output, Supported are string, number and boolean.\n",
                    "flag": "-C",
                    "long": "--table-column"
                },
                {
                    "name": "-N, --table-columns _",
                    "content": "Specify the columns names by comma separated list of names. The names are used for the\ntable header or to address column in option argument. See also --table-column.\n",
                    "flag": "-N",
                    "long": "--table-columns"
                },
                {
                    "name": "-l, --table-columns-limit _",
                    "content": "Specify maximal number of the input columns. The last column will contain all remaining\nline data if the limit is smaller than the number of the columns in the input data.\n",
                    "flag": "-l",
                    "long": "--table-columns-limit"
                },
                {
                    "name": "-R, --table-right _",
                    "content": "Right align text in the specified columns.\n",
                    "flag": "-R",
                    "long": "--table-right"
                },
                {
                    "name": "-T, --table-truncate _",
                    "content": "Specify columns where text can be truncated when necessary, otherwise very long table\nentries may be printed on multiple lines.\n",
                    "flag": "-T",
                    "long": "--table-truncate"
                },
                {
                    "name": "-E, --table-noextreme _",
                    "content": "Specify columns where is possible to ignore unusually long (longer than average) cells\nwhen calculate column width. The option has impact to the width calculation and table\nformatting, but the printed text is not affected.\n\nThe option is used for the last visible column by default.\n",
                    "flag": "-E",
                    "long": "--table-noextreme"
                },
                {
                    "name": "-e, --table-header-repeat",
                    "content": "Print header line for each page.\n",
                    "flag": "-e",
                    "long": "--table-header-repeat"
                },
                {
                    "name": "-W, --table-wrap _",
                    "content": "Specify columns where is possible to use multi-line cell for long text when necessary.\n",
                    "flag": "-W",
                    "long": "--table-wrap"
                },
                {
                    "name": "-H, --table-hide _",
                    "content": "Don’t print specified columns. The special placeholder '-' may be used to hide all\nunnamed columns (see --table-columns).\n",
                    "flag": "-H",
                    "long": "--table-hide"
                },
                {
                    "name": "-O, --table-order _",
                    "content": "Specify columns order on output.\n",
                    "flag": "-O",
                    "long": "--table-order"
                },
                {
                    "name": "-n, --table-name _",
                    "content": "Specify the table name used for JSON output. The default is \"table\".\n",
                    "flag": "-n",
                    "long": "--table-name"
                },
                {
                    "name": "-m, --table-maxout",
                    "content": "Fill all available space on output.\n",
                    "flag": "-m",
                    "long": "--table-maxout"
                },
                {
                    "name": "-L, --keep-empty-lines",
                    "content": "Preserve whitespace-only lines in the input. The default is ignore empty lines at all.\nThis option’s original name was --table-empty-lines but is now deprecated because it\ngives the false impression that the option only applies to table mode.\n",
                    "flag": "-L",
                    "long": "--keep-empty-lines"
                },
                {
                    "name": "-r, --tree _",
                    "content": "Specify column to use tree-like output. Note that the circular dependencies and other\nanomalies in child and parent relation are silently ignored.\n",
                    "flag": "-r",
                    "long": "--tree"
                },
                {
                    "name": "-i, --tree-id _",
                    "content": "Specify column with line ID to create child-parent relation.\n",
                    "flag": "-i",
                    "long": "--tree-id"
                },
                {
                    "name": "-p, --tree-parent _",
                    "content": "Specify column with parent ID to create child-parent relation.\n",
                    "flag": "-p",
                    "long": "--tree-parent"
                },
                {
                    "name": "-x, --fillrows",
                    "content": "Fill rows before filling columns.\n",
                    "flag": "-x",
                    "long": "--fillrows"
                },
                {
                    "name": "-h --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V --version",
                    "content": "Print version and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "The environment variable COLUMNS is used to determine the size of the screen if no other\ninformation is available.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The column command appeared in 4.3BSD-Reno.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Version 2.23 changed the -s option to be non-greedy, for example:\n\nprintf \"a:b:c\\n1::3\\n\" | column -t -s ':'\n\nOld output:\n\na  b  c\n1  3\n\nNew output (since util-linux 2.23):\n\na  b  c\n1     3\n\nHistorical versions of this tool indicated that \"rows are filled before columns\" by default,\nand that the -x option reverses this. This wording did not reflect the actual behavior, and\nit has since been corrected (see above). Other implementations of column may continue to use\nthe older documentation, but the behavior should be identical in any case.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Print fstab with header line and align number to the right:\n\nsed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE,OPTIONS,PASS,FREQ --table-right PASS,FREQ\n\nPrint fstab and hide unnamed columns:\n\nsed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE --table-hide -\n\nPrint a tree:\n\necho -e '1 0 A\\n2 1 AA\\n3 1 AB\\n4 2 AAA\\n5 2 AAB' | column --tree-id 1 --tree-parent 2 --tree 3\n1  0  A\n2  1  |-AA\n4  2  | |-AAA\n5  2  | `-AAB\n3  1  `-AB\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "colrm(1), ls(1), paste(1), sort(1)\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "For bug reports, use the issue tracker at \u001b[34mhttps://github.com/util-linux/util-linux/issues\u001b[0m.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The column command is part of the util-linux package which can be downloaded from \u001b[34mLinux\u001b[0m\n\u001b[34mKernel Archive \u001b[0m<https://www.kernel.org/pub/linux/utils/util-linux/>.\n\nutil-linux 2.39.3                            2023-11-21                                    COLUMN(1)",
            "subsections": []
        }
    },
    "summary": "column - columnate lists",
    "flags": [
        {
            "flag": "-J",
            "long": "--json",
            "arg": null,
            "description": "Use JSON output format to print the table, the option --table-columns is required and the option --table-name is recommended."
        },
        {
            "flag": "-c",
            "long": "--output-width",
            "arg": null,
            "description": "Output is formatted to a width specified as number of characters. The original name of this option is --columns; this name is deprecated since v2.30. Note that input longer than width is not truncated by default. The default is a terminal width and the 80 columns in non-interactive mode. The column headers are never truncated. The placeholder \"unlimited\" (or 0) is possible to use to not restrict output width. This is recommended for example when output to the files rather than on terminal."
        },
        {
            "flag": "-d",
            "long": "--table-noheadings",
            "arg": null,
            "description": "Do not print header. This option allows the use of logical column names on the command line, but keeps the header hidden when printing the table."
        },
        {
            "flag": "-o",
            "long": "--output-separator",
            "arg": null,
            "description": "Specify the columns delimiter for table output (default is two spaces)."
        },
        {
            "flag": "-s",
            "long": "--separator",
            "arg": null,
            "description": "Specify the possible input item delimiters (default is whitespace)."
        },
        {
            "flag": "-t",
            "long": "--table",
            "arg": null,
            "description": "Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the --output-separator option. Table output is useful for pretty-printing."
        },
        {
            "flag": "-C",
            "long": "--table-column",
            "arg": null,
            "description": "Define one column by comma separated list of column attributes. This option can be used more than once, every use defines just one column. The properties replace some of --table- options. For example --table-column name=FOO,right define one column where text is aligned to right. The option is mutually exclusive to --table-columns. The currently supported attributes are: name=string Specifies column name. trunc The column text can be truncated when necessary. The same as --table-truncate. right Right align text in the specified columns. The same as --table-right. width=number Specifies column width. The width is used as a hint only. The width is strictly followed only when strictwidth attribute is used too. strictwidth Strictly follow column width= setting. noextreme Specify columns where is possible to ignore unusually long cells. See --table-noextreme for more details. wrap Specify columns where is possible to use multi-line cell for long text when necessary. See --table-wrap. hide Don’t print specified columns. See --table-hide. json=type Define column type for JSON output, Supported are string, number and boolean."
        },
        {
            "flag": "-N",
            "long": "--table-columns",
            "arg": null,
            "description": "Specify the columns names by comma separated list of names. The names are used for the table header or to address column in option argument. See also --table-column."
        },
        {
            "flag": "-l",
            "long": "--table-columns-limit",
            "arg": null,
            "description": "Specify maximal number of the input columns. The last column will contain all remaining line data if the limit is smaller than the number of the columns in the input data."
        },
        {
            "flag": "-R",
            "long": "--table-right",
            "arg": null,
            "description": "Right align text in the specified columns."
        },
        {
            "flag": "-T",
            "long": "--table-truncate",
            "arg": null,
            "description": "Specify columns where text can be truncated when necessary, otherwise very long table entries may be printed on multiple lines."
        },
        {
            "flag": "-E",
            "long": "--table-noextreme",
            "arg": null,
            "description": "Specify columns where is possible to ignore unusually long (longer than average) cells when calculate column width. The option has impact to the width calculation and table formatting, but the printed text is not affected. The option is used for the last visible column by default."
        },
        {
            "flag": "-e",
            "long": "--table-header-repeat",
            "arg": null,
            "description": "Print header line for each page."
        },
        {
            "flag": "-W",
            "long": "--table-wrap",
            "arg": null,
            "description": "Specify columns where is possible to use multi-line cell for long text when necessary."
        },
        {
            "flag": "-H",
            "long": "--table-hide",
            "arg": null,
            "description": "Don’t print specified columns. The special placeholder '-' may be used to hide all unnamed columns (see --table-columns)."
        },
        {
            "flag": "-O",
            "long": "--table-order",
            "arg": null,
            "description": "Specify columns order on output."
        },
        {
            "flag": "-n",
            "long": "--table-name",
            "arg": null,
            "description": "Specify the table name used for JSON output. The default is \"table\"."
        },
        {
            "flag": "-m",
            "long": "--table-maxout",
            "arg": null,
            "description": "Fill all available space on output."
        },
        {
            "flag": "-L",
            "long": "--keep-empty-lines",
            "arg": null,
            "description": "Preserve whitespace-only lines in the input. The default is ignore empty lines at all. This option’s original name was --table-empty-lines but is now deprecated because it gives the false impression that the option only applies to table mode."
        },
        {
            "flag": "-r",
            "long": "--tree",
            "arg": null,
            "description": "Specify column to use tree-like output. Note that the circular dependencies and other anomalies in child and parent relation are silently ignored."
        },
        {
            "flag": "-i",
            "long": "--tree-id",
            "arg": null,
            "description": "Specify column with line ID to create child-parent relation."
        },
        {
            "flag": "-p",
            "long": "--tree-parent",
            "arg": null,
            "description": "Specify column with parent ID to create child-parent relation."
        },
        {
            "flag": "-x",
            "long": "--fillrows",
            "arg": null,
            "description": "Fill rows before filling columns."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help text and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Print version and exit."
        }
    ],
    "examples": [
        "Print fstab with header line and align number to the right:",
        "sed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE,OPTIONS,PASS,FREQ --table-right PASS,FREQ",
        "Print fstab and hide unnamed columns:",
        "sed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE --table-hide -",
        "Print a tree:",
        "echo -e '1 0 A\\n2 1 AA\\n3 1 AB\\n4 2 AAA\\n5 2 AAB' | column --tree-id 1 --tree-parent 2 --tree 3",
        "1  0  A",
        "2  1  |-AA",
        "4  2  | |-AAA",
        "5  2  | `-AAB",
        "3  1  `-AB"
    ],
    "see_also": [
        {
            "name": "colrm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/colrm/1/json"
        },
        {
            "name": "ls",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ls/1/json"
        },
        {
            "name": "paste",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/paste/1/json"
        },
        {
            "name": "sort",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sort/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Format `stdin` or a file into multiple columns.",
        "examples": [
            {
                "description": "Format the output of a command for a 30 characters wide display",
                "command": "printf \"header1 header2\\nbar foo\\n\" | column {{-c|--output-width}} {{30}}"
            },
            {
                "description": "Split columns automatically and auto-align them in a tabular format",
                "command": "printf \"header1 header2\\nbar foo\\n\" | column {{-t|--table}}"
            },
            {
                "description": "Specify the column delimiter character for the `--table` option (e.g. \",\" for CSV) (defaults to whitespace)",
                "command": "printf \"header1,header2\\nbar,foo\\n\" | column {{-t|--table}} {{-s|--separator}} {{,}}"
            },
            {
                "description": "Fill rows before filling columns",
                "command": "printf \"header1\\nbar\\nfoobar\\n\" | column {{-c|--output-width}} {{30}} {{-x|--fillrows}}"
            }
        ]
    }
}