Producing differences between 2 text files
Posted on 2006-05-02
I would like to see the changes (only additions) that have been made since I last took a backup of a text file (eg. /var/log/messages)
I tried "diff oldfile newfile", but that produces the wrong kind of output. So I thought about doing a "wc -l" on the old file, then printing all the line from the result of wc -l, to the end of the file using sed. This would probably work, but something inside me is nagging saying there's a better way of doing this.