I want to compare my local directory and remote directory.
Example: Consider 2 directories as local and remote directory
|-local
| |--aaa
| | |--file1
| | |--file2
| |
| |--bbb
| | |--file1
| | |--file2
| |-file1
|
|-remote
|--ddd
|--file1
|--file2
If I try running rsync
rsync -avcn local/ remote/
I am getting following output
./
file1
aaa/
aaa/file1
aaa/file2
bbb/
bbb/file1
bbb/file2
Is there a way where I can only get folder name if all the files are also missing from local
Excepted output:
file1
aaa/
bbb/
Here file1 and file2 both are present in "aaa" and "bbb", so only folder name should be visible in output.
ccc
come from? It's not in the first code block. Did you meanbbb
? Also, the output ofrsync
contains./
. By your logic, doesn't that also contain everything else?