Skip to content

Commit 3d30c2c

Browse files
Added diff -r command example and explanation in directories_comparison.md (bregman-arie#10596)
1 parent cf44009 commit 3d30c2c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## How to compare two directories in Linux?
2+
3+
You can use the 'diff' command with the '-r' flag to compare two direcotries recursively.
4+
5+
6+
7+
### Example:
8+
'''bash
9+
diff -r folder1/ folder2/
10+
11+
This command compares all the files and subdirectories inside 'folder1' and 'folder2'.
12+
If both directories have identical contents, it retuns nothing.
13+
If there are differences,it showss which files differ or are missing.

0 commit comments

Comments
 (0)