Fundamentals 10 min read

Master Essential Linux Commands: From col to wc Explained

This article provides concise explanations of dozens of essential Linux command‑line tools—including col, colrm, comm, csplit, ed, egrep, ex, fgrep, fmt, fold, grep, ispell, jed, joe, join, look, mtype, pico, rgrep, sed, sort, spell, tr, expr, uniq, wc, and let—detailing their purposes, typical usage, and how they handle input and output streams.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Essential Linux Commands: From col to wc Explained

col

The col command filters out control characters, especially RLF, from text streams, useful when redirecting documentation with “>” or “>>” to plain text.

colrm

The colrm command removes specified columns from each line of input; without arguments it passes all lines unchanged.

comm

The comm command compares two sorted files line by line, outputting three columns: lines unique to the first file, lines unique to the second, and lines common to both; using “-” reads from standard input.

csplit

The csplit command splits a file into pieces based on a pattern, naming the pieces xx00, xx01, etc.; using “-” reads from standard input.

ed

The ed command is a simple line‑oriented text editor, useful for scripting or editing large files, though less common than vi or vim.

egrep

The egrep command searches files using extended regular expressions, offering more expressive pattern matching than basic grep.

ex

The ex command starts the Vim editor in Ex mode; its syntax mirrors vi -E and can return to normal mode with “:vi” or “:visual”.

fgrep

The fgrep command behaves like grep -F, searching for fixed‑string patterns without interpreting regular expressions.

fmt

The fmt command reformats text files, adjusting line lengths according to a specified width; it reads from a file or standard input.

fold

The fold command wraps long lines to a given width, inserting line‑break characters as needed; it can read from files or standard input.

grep

The grep command searches for lines matching a pattern in one or more files, printing matching lines; with “-” it reads from standard input.

ispell

The ispell command performs spell checking using a dictionary (e.g., /usr/lib/ispell/english.hash), suggesting corrections or allowing additions to a personal dictionary.

jed

The jed command is a Slang‑based editor suited for editing source code.

joe

The joe command is a full‑screen text editor offering more features than pico while remaining easy to use; it can edit multiple files simultaneously.

join

The join command merges lines from two files that share a common field, outputting the combined result.

look

The look command performs a simple dictionary lookup, listing words that start with a given prefix.

mtype

The mtype command, part of the mtools suite, emulates the MS‑DOS type command to display the contents of DOS files.

pico

The pico command is a straightforward, display‑oriented text editor often bundled with the pine email client.

rgrep

The rgrep command recursively searches directories for files containing a pattern, similar to grep -r.

sed

The sed command applies a script of editing commands to transform text streams, enabling automated modifications across one or many files.

sort

The sort command orders the lines of a text file alphabetically or numerically, processing input from files or standard input.

spell

The spell command checks spelling by reading input and reporting misspelled words.

tr

The tr command translates or deletes characters from its input stream, reading from standard input and writing the transformed text to standard output.

expr

The expr command evaluates expressions, supporting integer arithmetic and string operations in shell scripts.

uniq

The uniq command filters adjacent duplicate lines in a sorted file, optionally reporting or removing them.

wc

The wc command counts lines, words, and bytes in a file or standard input.

let

The let builtin in Bash evaluates arithmetic expressions without requiring a leading $ on variable names; expressions containing spaces must be quoted.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxShellUnixtext processingcommand-line
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.