Re: using diff command
Curtis Vaughan said:
> Both are text files. File1 was File2 a day ago. Since then File2 has had
> additional information tagged on to it (it's a log file). All I want to
> see is what information has been added since yesterday. So, I would
> think that "diff File2 File1" should provide me with that information.
> But all I ever get is a message that the files differ. I have tried with
> various arguments, but no luck.
hi curis! I haven't emailed you in at least 5 minutes <g>
the command your using is right, though I don't know why it's telling
you that. I'm no expert on diff but i just used it about an hour ago
to generate a diff file. I "backported" the recent linux kernel patch
to my 2.2.19 kernel, and this is the result:
[root@portal:/usr/src/linux/kernel]# diff kmod.c.orig kmod.c
157a158,160
> {
> int old=current->dumpable;
> current->dumpable=0; /* block ptrace */
162a166
> current->dumpable=old;
163a168,169
> }
> current->dumpable=old;
for me I made the diff so I could apply it to a fresh copy of kmod.c
on other 2.2.19 systems, so I did(this is new to me)
[root@portal:/usr/src/linux/kernel]# cp kmod.c.orig /tmp/kmod.c
[root@portal:/usr/src/linux/kernel]# diff kmod.c.orig kmod.c >/tmp/diff.log
[root@portal:/usr/src/linux/kernel]# cd /tmp
[root@portal:/tmp]# patch -p0 kmod.c diff.log
patching file kmod.c
nate
Reply to: