Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6145049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:44:24+00:00 2026-05-23T18:44:24+00:00

I have downloaded a diff file to modify a number of files within a

  • 0

I have downloaded a diff file to modify a number of files within a versioned project directory (Xerces 2.8). The diff file contains the full path for each “left” file (the one represented by the – signs). The “right” file (+ signs) contains a relative path. For example:

--- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_xercesc/work/xerces-c-src_2_8_0/src/xercesc/util/Platforms/MacOS/MacCarbonFile.cpp  2007-08-28 20:44:07.000000000 +0200
+++ src/xercesc/util/Platforms/MacOS/MacCarbonFile.cpp  2009-10-28 19:37:22.000000000 +0100

My local copy of the project directory that I’d like to update with the diff file is, of course, at a different full path.

I cannot figure out where to place the diff file (or rather, in what directory to position myself when I run patch) and what command to run.

Because the second (+) file is a relative path, I thought that positioning myself in the proper location in my local file system so that the relative path is correct – and then issuing the command

patch -i patchfile

… would work. It does not (instead, patch presents me with a prompt for each file because it cannot locate it).

What command should I issue to get the diff file to merge using patch?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:44:24+00:00Added an answer on May 23, 2026 at 6:44 pm

    Pass -p followed by the appropriate number of path prefixes to strip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have downloaded Orca to edit an MSI file. I want to remove some banner
I have downloaded a web project from CodePlex and am getting the following error
I have a script which uploads files into an online directory and stores the
i have downloaded a website using HTtrack wepsite copier. All files are downloaded to
I have downloaded some Office files(doc, xls, pdf etc) on SDcard from FTP server
I have downloaded Qt Mobility Open source project. I had a set of demo
I have downloaded some Java source code from a book. It contains many directories
I have downloaded an Android project. To avoid name conflicts I want to move
Have downloaded VLC.py, and placed it in my VLC install directory, where libvlc.dll is
I have downloaded CorePlot_0.9 from google and imported in my iPhone project. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.