6 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
do you know any good server inventory open source products?
I want information like, server hostnames, ram, cpu, os, filesystems, volume groups, disks, adapters, installed software versions, firmware levels and so on
os: aix, solaris, linux, hpux
data should be kept in a database, web... (7 Replies)
Discussion started by: funksen
7 Replies
2. Shell Programming and Scripting
hi all,
i need to check the latest patch applied on my unix server. here is the server info:
bash-3.2$ uname -a
SunOS usa0300uz1226 5.10 Generic_148888-01 sun4u sparc SUNW,SPARC-Enterprise
please tell which is the command for checking patch? (1 Reply)
Discussion started by: lovelysethii
1 Replies
3. Solaris
How can I get the hardware inventory details of the Sun Servers like T5220 running Solaris 10?
I would like to see the following details:
1. Chassis Information - Part Number, Serial Number etc.
2. Slots Present in the chassis
3. Modules/Cards equipped on the slots. Module details like Part... (8 Replies)
Discussion started by: baddy
8 Replies
4. Linux
Hello all,
I have a script callled 'ABCstartup' setup under /etc/rc.d/init.d
Softlink 'S91ABCstartup' pointing to above script has been created under /etc/rc.d/rc3.d
The script is not being executed when the server restarts.
The script runs successfully via manual execution:... (5 Replies)
Discussion started by: hemangjani
5 Replies
5. Shell Programming and Scripting
Dear Team,
I am very new to shell scripting & and presently monitoring unix boxes
I am looking for a shell script which will give me the below output
script should contain -
hostname,OS Version,CPU details, Physical Memory, Partitions Details, Network Details and Software Installed,... (5 Replies)
Discussion started by: whizkidash
5 Replies
6. HP-UX
Hi there,
Please help, anyone know where to download latest Mod_SSL patch for Apache server v2.0.49 . Have tried www.apache.org but there is not latest patch available. (8 Replies)
Discussion started by: e_jeffhang
8 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)