9 More Discussions You Might Find Interesting
1. Solaris
I am trying to determine the date of the last patch on a Solaris machine. I know that I can get the last patch name with the uname -a command but that does give me any date info. Any ideas? (1 Reply)
Discussion started by: tdriley29
1 Replies
2. AIX
Hi all,
I am exploring how I can automate the download and patching of my AIX servers via a central management mechanism.
I will need to patch all my servers annually to a certain pre-determined Service Pack (SP) level.
So far I performed some online search and found 2 products that might... (6 Replies)
Discussion started by: pawpaw
6 Replies
3. UNIX for Advanced & Expert Users
Hi
I have a set of source files for the dwim utility, in the directory /usr/local/src/dwim-1.0.
I have a patch for adding an enhancement to dwim. The top line of the patch reads
diff -rc dwim-1.0-vanilla/Makefile dwim-1.0-raspberry-ripple/Makefile
Which commands should I use for applying the... (1 Reply)
Discussion started by: scofiled83
1 Replies
4. Solaris
Hello...
I'm looking for latest patch for automount and what it does on Solaris8, Thanks! :confused: (2 Replies)
Discussion started by: catwomen
2 Replies
5. Solaris
Can we get a script to find out a perticular patch installed on solaris 8, 9. (1 Reply)
Discussion started by: ddk2oo5
1 Replies
6. UNIX for Dummies Questions & Answers
Dear All ,
I have Sun Solaries 7 sparc server ... am runing perl , CGI , MD5 ... etc for new web mail am setting up .
now i have to install the patch ( xyz.pl.patch ) against a perl file for ex. xxx.pl
what exact command i have to use ,,, also i do not want to make damage for my system... (6 Replies)
Discussion started by: tamemi
6 Replies
7. Shell Programming and Scripting
Dear Guys ,
I use Linux Red Hat 9 ..
i installed a patch for a web mail i use , and i think it make a damage for my web mail i cannot see it anymore .
i get so many error messages .
what i want to ask is there any command on linux i can use to remove the patch !!!
i want to remove the... (1 Reply)
Discussion started by: tamemi
1 Replies
8. HP-UX
Hello,
I have to apply the patch PHSS_24302 on HPUX B.11.11 os version. When i look at the /var/adm/sw/swagentd.log it mentions that "this is not a valid depot". I downloaded the patch from HP web site. Please get back to me at the earliest as I'm dead in the water. Thanks,
Balaji K (3 Replies)
Discussion started by: bkrish
3 Replies
9. UNIX for Advanced & Expert Users
Is there a way to find out if a patch has been applied? I'm running Solaris 2.6 on an Ultra Sparc machine. Our UNIX System Admin has left the company and unfortunately for the time being I'm the man. I need to know if he installed Kernel patch 103640-05 and Thread patch 103920-05 before I can... (5 Replies)
Discussion started by: dman110168
5 Replies
XDIFF_FILE_PATCH(3) 1 XDIFF_FILE_PATCH(3)
xdiff_file_patch - Patch a file with an unified diff
SYNOPSIS
mixed xdiff_file_patch (string $file, string $patch, string $dest, [int $flags = DIFF_PATCH_NORMAL])
DESCRIPTION
Patches a $file with a $patch and stores the result in a file. $patch has to be an unified diff created by
xdiff_file_diff(3)/xdiff_string_diff(3) function. An optional $flags parameter specifies mode of operation.
PARAMETERS
o $file
- The original file.
o $patch
- The unified patch file. It has to be created using xdiff_string_diff(3), xdiff_file_diff(3) functions or compatible tools.
o $dest
- Path of the resulting file.
o $flags
- Can be either XDIFF_PATCH_NORMAL (default mode, normal patch) or XDIFF_PATCH_REVERSE (reversed patch). Starting from version
1.5.0, you can also use binary OR to enable XDIFF_PATCH_IGNORESPACE flag.
RETURN VALUES
Returns FALSE if an internal error happened, string with rejected chunks if patch couldn't be applied or TRUE if patch has been success-
fully applied.
EXAMPLES
Example #1
xdiff_file_patch(3) example
The following code applies unified diff to a file.
<?php
$old_version = 'my_script-1.0.php';
$patch = 'my_script.patch';
$errors = xdiff_file_patch($old_version, $patch, 'my_script-1.1.php');
if (is_string($errors)) {
echo "Rejects:
";
echo $errors;
}
?>
Example #2
Patch reversing example
The following code reverses a patch.
<?php
$new_version = 'my_script-1.1.php';
$patch = 'my_script.patch';
$errors = xdiff_file_patch($new_version, $patch, 'my_script-1.0.php', XDIFF_PATCH_REVERSE);
if (is_string($errors)) {
echo "Rejects:
";
echo $errors;
}
?>
SEE ALSO
xdiff_file_diff(3).
PHP Documentation Group XDIFF_FILE_PATCH(3)