如何同步两个文件的内容

时间:2013-03-11 13:46:51

标签: linux unix sync rsync

我想要同步两个文件的内容,File1& file2的

两个文件内容很少共同。

  • File2是主文件。
  • File1是普通文件。

文件2:

# cat File2

    [default]
host = XXXX

<i>[monitor:///server/dev-01/log/*.log*]</i>

index = main

disabled = false

sourcetype = serverlog

File1中:

# cat File1

    [default]
host = XXXX

<i>[monitor:///server/cat-01/log/*.log*]</i>

index = second

disabled = false

sourcetype = server-logs

必需:

# cat File2


    [default]
host = XXXX

<i>[monitor:///server/dev-01/log/*.log*]</i>

index = main

disabled = false

sourcetype = serverlog

<i>[monitor:///server/cat-01/log/*.log*]</i>

index = second

disabled = false

sourcetype = server-logs

0 个答案:

没有答案