Site icon New Generation Enterprise Linux

Leverage `column` for Tidy Terminal Output

Quick Tip

Leverage `column` for Tidy Terminal Output

Challenge: When dealing with commands that produce output in columns, such as `ls -l` or `ps aux`, the alignment can sometimes be inconsistent or hard to read, especially if file names or other data are of varying lengths.

The Solution: Pipe the output of your command through the column command with the -t flag.

your_command | column -t

Why it works: The column -t command analyzes the input and creates a table, automatically determining the number of columns and their widths for optimal alignment, making the output much more readable.

Pro-Tip: Use column -s <delimiter> -t to specify a custom delimiter if your input isn’t space-separated.

Linux Tips & Tricks | © ngelinux.com | 4/26/2026

0 0 votes
Article Rating
Exit mobile version