Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-09-2004, 02:53 AM   #1
Registered: May 2004
Distribution: SuSe 10.0
Posts: 154

Rep: Reputation: 30
how do i patch a file

I have been trying to get my netgear wg311t wireless card to be recognized with the Madwifi driver. If anyone can help me with that I have a post in the wireless networking forum. My problem is that I found a patch that I believe will help me resolve my problem.

When I execute:
patch -p0 madwifi.patch
My system hangs, I don't know what I am doing wrong. I never had to patch a file before. This is all new to me.

If you need to see the patch file it is located on the madwifi project page on the sourceforge website


Old 05-09-2004, 03:05 AM   #2
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
Using patch in the real world


Most of the time a 'patch'
patch multiple source files in a source flie tree,
I'll asume this is your situation.

Doing a 'man patch' gives you:


patch - apply a diff file to an original

patch [options] [originalfile [patchfile]]

but usually just

patch -pnum <patchfile


The way you invoked patch thinks you wanted to patch the file
madwifi.patch and then waits for info.

Your system does not hang,
it just sits there and waits for input.

try this:

"patch -p0 < madwifi.patch"

It will tell patch to patch the current directory,
and read the patch-info from std-in,
The patchfile is 'piped' into std-in.

It should work.

"What should I do now"
"Man patch,
and if that doesn't help you, man man"
(Jochen Riks)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create patch for a file kskkumar Linux - Newbie 4 12-15-2008 05:36 AM
How to use patch file jnsg Slackware 2 10-23-2005 07:08 PM
installing a .patch file nuzzy Linux - General 1 11-10-2003 05:30 PM
I have a patch (diff file). What now? Gurduloo Linux - Newbie 2 05-27-2003 02:20 PM
patch file udayan Programming 2 05-15-2002 09:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration