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

diff

Compare files line by line

Syntax

diff [OPTION]... FILES

Common Options

-uUnified format
-cContext format
-rRecursive compare
-iIgnore case
-wIgnore whitespace

Common Examples

diff file1.txt file2.txt

Compare two files

diff -u file1.txt file2.txt

Unified diff

diff -r dir1 dir2

Compare directories

Related Commands

Related Tools

More Code & Dev Tools