GO KALI FREE
File Management

diff Linux Command

Compares two files line by line and shows the differences.

What does diff do?

Compares two files line by line and shows the differences.

Syntax

diff [options] file1 file2

Practical example

diff old-config.conf new-config.conf

Related File Management

tee

Reads from stdin and writes to both stdout and one or more files simultaneously.

mkdir

Creates a new directory (folder). Use -p to create nested directories.

file

Determines and displays the file type (text, binary, image, etc.).

touch

Creates an empty file or updates the timestamp of an existing file.

stat

Displays detailed file and filesystem information (size, permissions, timestamps).

cp

Copies files or directories from one location to another.