mirror of
https://github.com/bregman-arie/devops-exercises.git
synced 2026-02-04 23:59:11 +00:00
Added diff -r command example and explanation in directories_comparison.md (#10596)
This commit is contained in:
parent
cf4400911b
commit
3d30c2c0e3
13
exercises/shell/solutions/directories_comparision.md
Normal file
13
exercises/shell/solutions/directories_comparision.md
Normal 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.
|
||||||
Loading…
x
Reference in New Issue
Block a user