Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

diff files

Posted on 1998-11-27
4
Medium Priority
?
251 Views
Last Modified: 2013-11-13
How can I 'install' a diff file with a lot of patches inside.
Say, redhat.diff
I keep getting rejected
0
Comment
Question by:bod_1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
terrycj earned 150 total points
ID: 1638628
> I keep getting rejected.

i guess this means you are using patch?

try the -p# argument to patch, where # is the number
of leading slashes to ignore in filenames in the diff
file. it's important.

e.g., if you're sitting in a directory with a file
called prog.c but your diff file was made by someone
with the command diff /usr/src/prog.c /usr/src/prog.c.orig,
then the diff file is going to mention /usr/src/prog.c
instead of simply prog.c. So you tell patch to ignore
the /usr/src/ part of the diff output via:

patch -p3 < diff-file

Terry.

0
 

Author Comment

by:bod_1
ID: 1638629
There's a patch that I got with RedHat's libc rpm.  It has the BSD ioctl's so I'm trying to patch sgtty.h with it.  I tried
   patch -p[3 4 5] < /.../redhat.diff
from /usr/include but patch keeps saying all of the hunks fail.?
0
 

Author Comment

by:bod_1
ID: 1638630
Guess it's a bad patch or something.?
0
 

Author Comment

by:bod_1
ID: 1638631
just did it by hand, it works
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question