First of all I give my directory structure in detail below.
src 1 1_1.txt test_line1 1_2.txt test_line1 2 2_1.txt test_line1 2_2.txt test_line1
I synchronised this
src directory with
dst directory. So now
dst directory is same as
src directory using following
rsync -av src/* dst/
Well. If I add a line any of the file existing in
src directory, the same command copies the changes in that
Now I adding extra text line in
dst directory. In this case,
dst directory are not same.
If I run the above
rsync command I thought it will remove that extra line from that file at
dst directory. But It didn't happen.
What should I do to keep files are same as
When a new directory/file added in
dstdirectory manually, It should prompt to remove that directory/file or not when I run
rsynccommand. How can I do that?