Сделал ли мой rsync успешное резервное копирование всех данных или нет?

По крайней мере, с GNU diff , это кажется возможным с подходящими спецификаторами LFMT (формат строки):

diff --new-line-format="replace line %-dn with:%c'\012'%L" --unchanged-line-format= --old-line-format= file1 file2

Протестировано с:

$ cat file1
Hello, this is a file.
It is pretty cool.
I wrote it in a text editor.

$ cat file2
Hello, this is a file.
It is kinda awesome.
I wrote it in a text editor.

$ diff --new-line-format="replace line %-dn with:%c'\012'%L" --unchanged-line-format= --old-line-format= file1 file2 
replace line 2 with: 
It is kinda awesome.
0
30.11.2018, 00:00
0 ответов

Теги

Похожие вопросы