Solved

diff files

Posted on 1998-11-27
4
242 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
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
terrycj earned 50 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now