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 6993557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:46:47+00:00 2026-05-27T19:46:47+00:00

I am on Linux, working on forking a PHP project. I want to create

  • 0

I am on Linux, working on forking a PHP project. I want to create a patch file of the work that I have done, that can be applied to the latest parental code. Both original folder and new code folder are many subdirectories deep (so need recursive).

For some reason when I do :

diff -ur folder1 folder2 > newcode.patch

I don’t manage to get the patch file including all of the new files, and it doesn’t even contain some of the deeper file changes ( about 3+ levels deep).

Any ideas how to go about this? I’ve looked at Meld and Kdiff3…but they don’t appear to do what I want either.

  • 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-27T19:46:47+00:00Added an answer on May 27, 2026 at 7:46 pm

    I suspect you have a directory structure that’s something like :

    folder1/
      text.txt
      level1/
        text1.txt
        level2/
          text2.txt
          level3/
            text3.txt
    
    folder2
      text.txt
      level1/
        text1.txt
        level2/
          text2.txt
          anewdirectory/
            newtext.txt
          level3/
            text3.txt
            newfiled3.txt
    

    In this case, diff will ignore the file newtext.txt within anewdirectory/. It probably also doesn’t pick up the text of newfiled3.txt either. Instead it reports something like :

    ..
    Only in folder2/level1/level2/ : anewdirectory
    Only in folder2/level1/level2/level3/ : newfiled3.txt
    ..
    

    Is this the symptom you’re seeing?
    Try :

    diff -urBNs folder1/ folder2/ > code.patch
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a (from what I can tell) perfectly working Linux setup (Ubuntu 8.04)
Actually I have a file . I am working in linux environment. I need
Iam working on Ubuntu.(Linux) I want to redirect from the page one.php to two.php,
I'm working on an embedded Linux project that interfaces an ARM9 to a hardware
I am working in Linux and i have a little bit confusion that whether
I have a network application working on Linux. What I want to do is
I'm working in linux. I have two programs that run for infinite time (
I'm working on a server application that's going to work on Linux and Mac
I'm working on getting my ASP.Net project working on Linux. I've been testing my
I am trying to have iptables-1.4.3.2 work with Linux-2.6.35.9 on our MIPS based platform.

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.