Sim, imprimirá todas as linhas diferentes entre os dois arquivos, a menos que qualquer arquivo contenha caracteres binários.
Exemplos:
Com espaço em branco :
echo 'difftest ' > diff1
echo 'difftest' > diff2
diff diff1 diff2
Saída:
1c1
< difftest
---
> difftest
Com nova linha :
echo 'difftest ' > diff1
echo 'difftest\n' > diff2
diff diff1 diff2
Saída:
1c1,2
< difftest
---
> difftest
>
Com caractere binário (NULL):
echo 'difftestBinary files diff1 and diff2 differ
' > diff1
echo 'difftest' > diff2
diff diff1 diff2
Saída:
echo 'difftest ' > diff1
echo 'difftest' > diff2
diff diff1 diff2