XDIFF_FILE_PATCH_BINARY(3) 1 XDIFF_FILE_PATCH_BINARY(3)xdiff_file_patch_binary - Alias of xdiff_file_bpatchSYNOPSIS
bool xdiff_file_patch_binary (string $file, string $patch, string $dest)
DESCRIPTION
Patches a $file with a binary $patch and stores the result in a file $dest. This function accepts patches created both via
xdiff_file_bdiff(3) or xdiff_file_rabdiff(3) functions or their string counterparts.
Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch(3).
PARAMETERS
o $file
- The original file.
o $patch
- The binary patch file.
o $dest
- Path of the resulting file.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
xdiff_file_patch_binary(3) example
The following code applies binary diff to a file.
<?php
$old_version = 'archive-1.0.tgz';
$patch = 'archive.bpatch';
$result = xdiff_file_patch_binary($old_version, $patch, 'archive-1.1.tgz');
if ($result) {
echo "File patched";
} else {
echo "File couldn't be patched";
}
?>
NOTES
Note
Both files ($file and $patch) will be loaded into memory so ensure that your memory_limit is set high enough.
SEE ALSO xdiff_string_patch_binary(3).
PHP Documentation Group XDIFF_FILE_PATCH_BINARY(3)
Check Out this Related Man Page
XDIFF_FILE_DIFF(3) 1 XDIFF_FILE_DIFF(3)xdiff_file_diff - Make unified diff of two filesSYNOPSIS
bool xdiff_file_diff (string $old_file, string $new_file, string $dest, [int $context = 3], [bool $minimal = false])
DESCRIPTION
Makes an unified diff containing differences between $old_file and $new_file and stores it in $dest file. The resulting file is human-
readable. An optional $context parameter specifies how many lines of context should be added around each change. Setting $minimal parameter
to true will result in outputting the shortest patch file possible (can take a long time).
PARAMETERS
o $old_file
- Path to the first file. This file acts as "old" file.
o $new_file
- Path to the second file. This file acts as "new" file.
o $dest
- Path of the resulting patch file.
o $context
- Indicates how many lines of context you want to include in diff result.
o $minimal
- Set this parameter to TRUE if you want to minimalize size of the result (can take a long time).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
xdiff_file_diff(3) example
The following code makes unified diff of two php files with context length of 2.
<?php
$old_version = 'my_script.php';
$new_version = 'my_new_script.php';
xdiff_file_diff($old_version, $new_version, 'my_script.diff', 2);
?>
NOTES
Note
This function doesn't work well with binary files. To make diff of binary files use xdiff_file_bdiff(3)/xdiff_file_rabdiff(3) func-
tion.
SEE ALSO xdiff_file_patch(3).
PHP Documentation Group XDIFF_FILE_DIFF(3)
Could anyone of y'all gurus tell me of how to open *.tgz files in WinXP....which program should i use to open it...i have tried going online to open it ut all in vain...please help
Gerry... (5 Replies)
I trying to convert the path data where \ are used to /. Can anyone help as I am obviously doing something incorrect!
echo "File One"
read fileone | sed 's#\\#/#g'
echo "File Two"
read filetwo | sed 's#\\#/#g'
diff $fileone $filetwo
pg (1 Reply)
Hello
I have a ton of files in a directory of the format app.log.2008-04-04
I'd like to run a command that would archive each of these files as app.log.2008-04-04.tgz
I tried a few combinations of find with xargs etc but no luck.
Thanks
Amit (4 Replies)
Hi, I was troubleshooting H/W issue on a Ultra 5 workstation, whereby the system kept rebooting. In the course of isolating the issue, I patched the system with the latest Recommended cluster patch for solaris 7. SInce then, sendmail is not working and am getting the following errors. Kindly check... (6 Replies)
Hi all,
The below command tries to copy ".tgz" instead of "hello_test.tgz" -- It seems as if the underscore gets in the way. I tried with different ways of using quotes, with no luck, unfortunately...it's probably very simple, but may I ask how this would be done:
How would the below be... (3 Replies)
Other than looking at the dates when pkgs were applied in /var/log/yum.log* how can I tell when the last time a RedHat system was patched? My systems don't have regular access to the web.
Thanks in advance.
---------- Post updated at 02:37 PM ---------- Previous update was at 02:27 PM... (0 Replies)
I patched a linux kernel 2.6.28 with lttng patch.
Now I have two folder of linux patched and unpatched.
How can I verify whether the linux is patched or unptahced(original version)? (0 Replies)
I'm working on developing a patch policy for a mid-size and quickly growing company. Patches have been at the bottom of the totem pole for years. I possess the ability and care enough to straighten it out. However I'd like some others input on the best way to handle the patch policy.
From when... (1 Reply)
Howdy folks, in keeping my servers patched up to date, I normally use the swainv shell script to generate inventory.xml, upload it to ITRC for patch analysis, and then download the recommended bundle.
I have a whole bunch of 11.31 servers that are not internet-connected now, but I do have the... (2 Replies)
Hey,
I have number of .tgz files and want to extract the file with the ending *results.txt from each one.
I have tried
for file in *.tgz; do tar --wildcards -zxf $file *results.txt; doneas well as
list=$(ls *.tgz)
for i in $list; do tar --wildcards -zxvf $i *.results.txt; done... (1 Reply)
Can anyone here help me in understanding how to patch AIX machine.Its all vulnerability patching and i have sent an attachment with this saying what needs to be patched.I have not done patching at all.Can anyone help me with the steps on how to do the Patching.Whoever is helping i think this is... (3 Replies)
Hi Experts,
ps command behavior in Redhat is such that it outputs all the output(of long lengths). In Unix the ps command output was limited to only 80 chars. In that if you pipe its output to another command hen the 80 chars restriction wouldn't be there. This 80 char limitation will only be... (14 Replies)