Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xdiff_file_patch_binary(3) [php man page]

XDIFF_FILE_PATCH_BINARY(3)						 1						XDIFF_FILE_PATCH_BINARY(3)

xdiff_file_patch_binary - Alias of xdiff_file_bpatch

SYNOPSIS
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 files

SYNOPSIS
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)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unzip .tgz files

hi all How to unzip .tgz files waiting for suggestions Praful (5 Replies)
Discussion started by: Prafulla
5 Replies

2. Windows & DOS: Issues & Discussions

*.tgz file on WinXP

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)
Discussion started by: gerald_agoi
5 Replies

3. Shell Programming and Scripting

Path data

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)
Discussion started by: ithomp
1 Replies

4. UNIX for Dummies Questions & Answers

Create individual tgz files from a set of files

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)
Discussion started by: amitg
4 Replies

5. Solaris

sendmail failed after patch update

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)
Discussion started by: incredible
6 Replies

6. UNIX for Dummies Questions & Answers

file.tgz.1of2 & file.tgz.2of2

Hi all, Need help. Anybody seen this kind of file before? file.tgz.1of2 file.tgz.2of2 how to extract this tgz file? Any help? Tq (5 Replies)
Discussion started by: zeedwolf
5 Replies

7. UNIX for Dummies Questions & Answers

Question on using a variable in KSH

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)
Discussion started by: chatguy
3 Replies

8. Red Hat

RedHat patch date?

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)
Discussion started by: toor13
0 Replies

9. Hardware

Verify patching

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)
Discussion started by: rupeshkp728
0 Replies

10. Cybersecurity

Need patch policy help

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)
Discussion started by: jlouki01
1 Replies

11. HP-UX

[Solved] Patching HP-UX 11.31 from DVD vs. ITRC

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)
Discussion started by: lupin..the..3rd
2 Replies

12. Shell Programming and Scripting

Extracting specific files from multiple .tgz files

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)
Discussion started by: jfern
1 Replies

13. AIX

AIX server patching

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)
Discussion started by: Revathi2089
3 Replies

14. Red Hat

Ps command different behaviour

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)
Discussion started by: Albert_Pinto7
14 Replies