Added diff -r command example and explanation in directories_comparison.md (#10596)

This commit is contained in:
Mohit Pant 2025-08-07 22:54:08 +05:30 committed by GitHub
parent cf4400911b
commit 3d30c2c0e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,13 @@
## How to compare two directories in Linux?
You can use the 'diff' command with the '-r' flag to compare two direcotries recursively.
### Example:
'''bash
diff -r folder1/ folder2/
This command compares all the files and subdirectories inside 'folder1' and 'folder2'.
If both directories have identical contents, it retuns nothing.
If there are differences,it showss which files differ or are missing.