Command hub

Text Processing commands

Windows text-search and file-content commands translated to Linux text processing tools and shell pipelines.

Binary/TextCSV/Structured DataEncodingFieldsFilesJSONPowerShell TextSearchSort/CompareText Processing

Distro notes

Debian/Ubuntu vs Fedora vs Arch

Text Processing

Debian/Ubuntu apt sudo apt install jq gawk xclip

grep, sort, diff, head, tail and wc are usually installed already.

Fedora dnf sudo dnf install jq gawk xclip

Core text tools are standard; install jq for JSON-heavy workflows.

Arch pacman sudo pacman -S jq gawk xclip

Arch package names are usually direct for these utilities.

Guides

All Text Processing command guides

58 commands

PowerShell Format-Hexhexdump -C file Binary/Text Canonical hex dump Shows offsets, hex bytes and printable text. Distro equivalents Debian/Ubuntu hexdump -C file Fedora hexdump -C file Arch hexdump -C file Open full guide → hexdump in PowerShell Format-Hexxxd file Binary/Text Hex dump a file Displays binary files as hexadecimal bytes. Distro equivalents Debian/Ubuntu xxd file Fedora xxd file Arch xxd file Open full guide → strings.exestrings file Binary/Text Extract printable strings Prints readable strings from binary files. Distro equivalents Debian/Ubuntu strings file Fedora strings file Arch strings file Open full guide → PowerShell ConvertFrom-Csvmlr --icsv cat file.csv CSV/Structured Data Read CSV records Processes CSV as structured records with Miller when installed. Distro equivalents Debian/Ubuntu mlr --icsv cat file.csv Fedora mlr --icsv cat file.csv Arch mlr --icsv cat file.csv Open full guide → PowerShell Export-Csvmlr --ocsv cat > file.csv CSV/Structured Data Write CSV records Writes structured records as CSV with Miller when installed. Distro equivalents Debian/Ubuntu mlr --ocsv cat > file.csv Fedora mlr --ocsv cat > file.csv Arch mlr --ocsv cat > file.csv Open full guide → certutil -decodebase64 -d file.b64 Encoding Base64 decode a file Decodes base64 text back to binary data. Distro equivalents Debian/Ubuntu base64 -d file.b64 Fedora base64 -d file.b64 Arch base64 -d file.b64 Open full guide → certutil -encodebase64 file Encoding Base64 encode a file Encodes binary data as base64 text. Distro equivalents Debian/Ubuntu base64 file Fedora base64 file Arch base64 file Open full guide → PowerShell ForEach-Object splitcut -d: -f1 Fields Cut delimited fields Extracts fields from delimiter-separated lines. Distro equivalents Debian/Ubuntu cut -d: -f1 Fedora cut -d: -f1 Arch cut -d: -f1 Open full guide → PowerShell Select-Object propertyawk "{print $1}" Fields Select fields Prints selected fields from structured text. Distro equivalents Debian/Ubuntu awk "{print $1}" Fedora awk "{print $1}" Arch awk "{print $1}" Open full guide → join filesjoin file1 file2 Fields Join sorted files Joins lines from two sorted files on a common field. Distro equivalents Debian/Ubuntu join file1 file2 Fedora join file1 file2 Arch join file1 file2 Open full guide → paste filespaste file1 file2 Fields Merge lines side by side Combines corresponding lines from multiple files. Distro equivalents Debian/Ubuntu paste file1 file2 Fedora paste file1 file2 Arch paste file1 file2 Open full guide → PowerShell Get-Random linesshuf file Files Shuffle lines Randomizes the order of lines. Distro equivalents Debian/Ubuntu shuf file Fedora shuf file Arch shuf file Open full guide → expand tabsexpand -t 4 file Files Convert tabs to spaces Expands tab characters into spaces. Distro equivalents Debian/Ubuntu expand -t 4 file Fedora expand -t 4 file Arch expand -t 4 file Open full guide → fold long linesfold -w 80 file Files Wrap long lines Wraps long text lines to a target width. Distro equivalents Debian/Ubuntu fold -w 80 file Fedora fold -w 80 file Arch fold -w 80 file Open full guide → nl filenl -ba file Files Number lines Adds line numbers to file output. Distro equivalents Debian/Ubuntu nl -ba file Fedora nl -ba file Arch nl -ba file Open full guide → split large filesplit -b 100M file part_ Files Split a large file Splits a file into fixed-size chunks. Distro equivalents Debian/Ubuntu split -b 100M file part_ Fedora split -b 100M file part_ Arch split -b 100M file part_ Open full guide → unexpand spacesunexpand -t 4 file Files Convert spaces to tabs Converts leading spaces back into tabs. Distro equivalents Debian/Ubuntu unexpand -t 4 file Fedora unexpand -t 4 file Arch unexpand -t 4 file Open full guide → PowerShell ConvertFrom-Json object fieldjq ".field" file.json JSON Read JSON field Extracts a field from JSON. Distro equivalents Debian/Ubuntu jq ".field" file.json Fedora jq ".field" file.json Arch jq ".field" file.json Open full guide → PowerShell ConvertTo-Json compactjq -c . file.json JSON Compact JSON Prints compact one-line JSON. Distro equivalents Debian/Ubuntu jq -c . file.json Fedora jq -c . file.json Arch jq -c . file.json Open full guide → PowerShell -replacesed "s/old/new/g" file PowerShell Text Replace text with regex Performs stream text substitution. Distro equivalents Debian/Ubuntu sed "s/old/new/g" file Fedora sed "s/old/new/g" file Arch sed "s/old/new/g" file Open full guide → PowerShell Format-Tablecolumn -t PowerShell Text Align tabular text Formats delimited text into aligned columns. Distro equivalents Debian/Ubuntu column -t Fedora column -t Arch column -t Open full guide → PowerShell Get-Content -Headhead -n 20 file PowerShell Text Show first lines Prints the beginning of a file. Distro equivalents Debian/Ubuntu head -n 20 file Fedora head -n 20 file Arch head -n 20 file Open full guide → PowerShell Get-Content -Tailtail -n 20 file PowerShell Text Show last lines Prints the end of a file. Distro equivalents Debian/Ubuntu tail -n 20 file Fedora tail -n 20 file Arch tail -n 20 file Open full guide → PowerShell Group-Objectsort | uniq -c PowerShell Text Group and count records Groups identical lines and counts occurrences. Distro equivalents Debian/Ubuntu sort | uniq -c Fedora sort | uniq -c Arch sort | uniq -c Open full guide → PowerShell Out-GridViewfzf PowerShell Text Interactive filtering Uses fuzzy finder for interactive terminal filtering. Distro equivalents Debian/Ubuntu fzf Fedora fzf Arch fzf Open full guide → PowerShell Out-Stringcat PowerShell Text Emit text stream Passes file or command text through stdout. Distro equivalents Debian/Ubuntu cat Fedora cat Arch cat Open full guide → PowerShell Select-Object -Firsthead -n 10 PowerShell Text Keep first records Limits pipeline output to the first records. Distro equivalents Debian/Ubuntu head -n 10 Fedora head -n 10 Arch head -n 10 Open full guide → PowerShell Select-Object -Lasttail -n 10 PowerShell Text Keep last records Limits pipeline output to the last records. Distro equivalents Debian/Ubuntu tail -n 10 Fedora tail -n 10 Arch tail -n 10 Open full guide → PowerShell Select-Object -Uniquesort -u PowerShell Text Keep unique records Sorts and removes duplicate lines. Distro equivalents Debian/Ubuntu sort -u Fedora sort -u Arch sort -u Open full guide → Select-String -NotMatchgrep -v "pattern" file PowerShell Text Invert text search Prints lines that do not match a pattern. Distro equivalents Debian/Ubuntu grep -v "pattern" file Fedora grep -v "pattern" file Arch grep -v "pattern" file Open full guide → dir /od (sort by date)find . -mtime -1 Search Find recently modified files Locates files modified within a specific time window. Distro equivalents Debian/Ubuntu find . -mtime -1 Fedora find . -mtime -1 Arch find . -mtime -1 Open full guide → dir /s /b (recursive list)find . -type f Search List all files recursively Recursively lists every file in a directory tree, one per line — no directories, just files. Distro equivalents Debian/Ubuntu find . -type f Fedora find . -type f Arch find . -type f Open full guide → findfind Search Search for files and directories Searches for files matching given criteria anywhere in the filesystem. Distro equivalents Debian/Ubuntu find Fedora find Arch find Open full guide → findstrgrep Search Search text within files Searches for text patterns inside files. One of the most-used Linux commands. Distro equivalents Debian/Ubuntu grep Fedora grep Arch grep Open full guide → findstr /bgrep "^pattern" file Search Match beginning of line Uses a regex anchor to match the start of lines. Distro equivalents Debian/Ubuntu grep "^pattern" file Fedora grep "^pattern" file Arch grep "^pattern" file Open full guide → findstr /cgrep -F "literal text" file Search Search literal string Searches fixed text instead of regex syntax. Distro equivalents Debian/Ubuntu grep -F "literal text" file Fedora grep -F "literal text" file Arch grep -F "literal text" file Open full guide → findstr /egrep "pattern$" file Search Match end of line Uses a regex anchor to match line endings. Distro equivalents Debian/Ubuntu grep "pattern$" file Fedora grep "pattern$" file Arch grep "pattern$" file Open full guide → findstr /igrep -i "pattern" file Search Case-insensitive search Matches text without case sensitivity. Distro equivalents Debian/Ubuntu grep -i "pattern" file Fedora grep -i "pattern" file Arch grep -i "pattern" file Open full guide → findstr /ngrep -n "pattern" file Search Show matching line numbers Prints line numbers beside matches. Distro equivalents Debian/Ubuntu grep -n "pattern" file Fedora grep -n "pattern" file Arch grep -n "pattern" file Open full guide → findstr /r (regex)grep -E Search Search using extended regular expressions Searches text using extended regular expressions for complex pattern matching. Distro equivalents Debian/Ubuntu grep -E Fedora grep -E Arch grep -E Open full guide → findstr /sgrep -R "pattern" path/ Search Search recursively Searches files under a directory tree. Distro equivalents Debian/Ubuntu grep -R "pattern" path/ Fedora grep -R "pattern" path/ Arch grep -R "pattern" path/ Open full guide → Get-Uniqueuniq Sort/Compare Remove adjacent duplicates Filters repeated neighboring lines. Distro equivalents Debian/Ubuntu uniq Fedora uniq Arch uniq Open full guide → PowerShell Compare-Object -IncludeEqualcomm file1 file2 Sort/Compare Compare sorted files Compares sorted files and can show common lines. Distro equivalents Debian/Ubuntu comm file1 file2 Fedora comm file1 file2 Arch comm file1 file2 Open full guide → fc /ndiff -u file1 file2 Sort/Compare Compare text with context Shows unified differences between text files. Distro equivalents Debian/Ubuntu diff -u file1 file2 Fedora diff -u file1 file2 Arch diff -u file1 file2 Open full guide → sort /+Nsort -k N file Sort/Compare Sort by field Sorts text using a field key. Distro equivalents Debian/Ubuntu sort -k N file Fedora sort -k N file Arch sort -k N file Open full guide → sort /rsort -r file Sort/Compare Reverse sort Sorts lines in reverse order. Distro equivalents Debian/Ubuntu sort -r file Fedora sort -r file Arch sort -r file Open full guide → clip / clip.exexclip / xsel Text Processing Copy output to clipboard Pipes command output directly into the clipboard so you can paste it elsewhere. Distro equivalents Debian/Ubuntu xclip / xsel Fedora xclip / xsel Arch xclip / xsel Open full guide → fcdiff Text Processing Compare two files Compares two files and shows the differences between them line by line. Distro equivalents Debian/Ubuntu diff Fedora diff Arch diff Open full guide → findstr (character replace — n/a)tr Text Processing Translate or delete characters Replaces, deletes, or squeezes individual characters in text — a character-level find and replace. Distro equivalents Debian/Ubuntu tr Fedora tr Arch tr Open full guide → findstr /v (invert)tac Text Processing Print file in reverse line order Outputs a file with lines in reverse order — last line first. The name is 'cat' backwards. Distro equivalents Debian/Ubuntu tac Fedora tac Arch tac Open full guide → for /f (field parsing)cut Text Processing Extract columns or fields from text Cuts out sections of each line — by delimiter-separated field number or character position. Distro equivalents Debian/Ubuntu cut Fedora cut Arch cut Open full guide → sortsort Text Processing Sort lines of text Sorts the lines of a text file or input alphabetically, numerically, or by other criteria. Distro equivalents Debian/Ubuntu sort Fedora sort Arch sort Open full guide → sort /uniquesort | uniq Text Processing Filter duplicate adjacent lines Removes or counts duplicate lines. Must be used after sorting — it only removes adjacent duplicates. Distro equivalents Debian/Ubuntu sort | uniq Fedora sort | uniq Arch sort | uniq Open full guide → type (awk — no equiv)awk Text Processing Process and extract columns from structured text A powerful text-processing tool that splits lines into fields and lets you extract, transform, and report on structured text. Distro equivalents Debian/Ubuntu awk Fedora awk Arch awk Open full guide → type (end of file / logs)tail Text Processing Display the last lines of a file Shows the last N lines of a file. With -f, follows the file in real-time — essential for watching logs. Distro equivalents Debian/Ubuntu tail Fedora tail Arch tail Open full guide → type (first lines)head Text Processing Display the first lines of a file Shows only the first N lines of a file — useful for quickly previewing large files. Distro equivalents Debian/Ubuntu head Fedora head Arch head Open full guide → type file | clip (base64 — no equiv)base64 Text Processing Encode or decode Base64 Converts binary data to Base64 text encoding and back. Common in APIs, certificates, and email attachments. Distro equivalents Debian/Ubuntu base64 Fedora base64 Arch base64 Open full guide → wc (word count — no Windows equiv)wc Text Processing Count words, lines, characters Counts lines, words, and characters in a file or piped input. Very useful in scripts. Distro equivalents Debian/Ubuntu wc Fedora wc Arch wc Open full guide →