I can create a patch for a file with the following:
Code:
diff -uN OldFile NewFile > patch.txt
then apply the patch with:
Code:
patch OldFile < patch.txt
I tried this with directories:
Code:
diff -uN OldDirectory NewDirectory > patch.txt
it seemed to work fine. Then I tried to apply the patch:
Hi all, I kwow there are many ways to insert string into a files all over the forum, but I need to make that process like patch do because in the same file I can have the same pattern in many locations, for that I need the send two patterns, one for "before" and another for the "after".
I cannot be capable to do it with patch and diff because the original file to be patched ca
Hi,
I'm trying to use sdiff by parsing the output of another command instead of the filename:
Code:
sdiff <(echo test1) <(echo test2)
However, this seems to cause my terminal session to stop working.
I'm not much of a unix guy so I'll just go ahead and ask:
I have a following problem - two folders with plenty of subfolders. I need to diff them.
I tried this:
diff -drupN vanila_kernel_3.0.8 my_kernel_3.0.8 > kernel.patch
and that results in a 85mb file...
Yes, there is. You save a copy of the original file somewhere else, then edit the file. Afterwards you run diff to create a patch, which you can apply later in the PKGBUILD. For an introduction to patch and diff see e.g. http://jungels.net/articles/diff-patch-ten-minutes.html. For an example of a PKGBUILD that uses patch, see e.g. http://gitorious.org/chakra-packages/ap … e/PKGBUILD.
Hello All,
I am not well-versed with Unix commands.
hi
i have two large files ,for example test1.txt ,test2.txt
test1
b
a
c
e
test2
a
e
f
g
how i can output the differnt vlue for test1(vlaue that not found in test2 ) and the diffeent value of test2 (vlaue that not found in test1 )
thanks
Could anyone help me with this code
diff -u /home/mint/projekt/exp/.le/f1.txt /home/mint/projekt/proj/f1.txt > /home/mint/projekt/exp/patch.patch
patch /home/mint/projekt/exp/f1.txt /home/mint/projekt/exp/patch.patch
I want to patch f1.txt with output from diff -u command can anyone help me because this doesn't work and an error : HUNK #1 FAILED at 1. still appears
Hi,
I have crated a cpmove-test1.tar.gz file using the script at /scripts/pkgacct for the user test1(test1.com) in a server. Same User of test1 is having another account as test2(test2.com) in another server and want to move all his domains in test1 to test2. I have copied the cpmove-test1.tar.gz file to another server in which test2 resides.