Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

join

Join two files on a common field

Syntax

join [OPTION]... FILE1 FILE2

Common Options

-tSpecify separator
-1Join field for FILE1
-2Join field for FILE2
-aShow unpairable lines
-vShow only unpairable lines
-iIgnore case
-oCustom output format

Common Examples

join file1.txt file2.txt

Join on first field

join -t "," file1.csv file2.csv

Join CSV files

join -1 2 -2 1 file1.txt file2.txt

Specify join fields

join -a 1 file1.txt file2.txt

Show all FILE1 lines

Related Commands

Related Tools

More Code & Dev Tools