Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #80268

Re: patch a file with the patch command

Path csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From alex <1j9448a02@lnx159sneakemail.com.invalid>
Newsgroups alt.os.linux
Subject Re: patch a file with the patch command
Date Tue, 6 Aug 2024 07:36:58 +0200
Organization A noiseless patient Spider
Lines 41
Message-ID <v8t8u7$1k2m4$1@dont-email.me> (permalink)
References <v8pvb6$iff4$1@dont-email.me> <lhbom2FnhvqU1@mid.individual.net> <v8qrch$qt2t$1@dont-email.me> <lhct4kFt2soU1@mid.individual.net>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Tue, 06 Aug 2024 15:37:12 +0200 (CEST)
Injection-Info dont-email.me; posting-host="5d388d5dbbe5f64e081658a80175fe3b"; logging-data="1706692"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RTwsFI72McKcfjcSVaTnE"
User-Agent Mozilla Thunderbird
Cancel-Lock sha1:rC/nlZbRQIwrNU/itifYT9pGAYw=
In-Reply-To <lhct4kFt2soU1@mid.individual.net>
Content-Language it-IT
Xref csiph.com alt.os.linux:80268

Show key headers only | View raw


Il 05/08/24 23:05, J.O. Aho ha scritto:
> 
> it's to remove the first level of directory as in my example the paths 
> had been

├── orig
│   └── file.txt
└── revised
     └── file.txt

$ cat orig/file.txt
buggated

$ cat revised/file.txt
fixed

$ diff -ur orig/ revised/ > file.patch

├── file.patch (FILE CREATED)
├── orig
│   └── file.txt
└── revised
     └── file.txt

$ cd orig/

$ patch < ../file.patch
patching file file.txt

$ cd ..

$ cat orig/file.txt
fixed

To notice

$ patch < ../file.patch

Even if it was not used -p1 it worked equally.

Why?

Back to alt.os.linux | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 09:35 +0200
  Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 12:43 +0200
    Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 17:33 +0200
      Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 23:05 +0200
        Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:39 +0200
          Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-06 08:06 +0200
        Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:36 +0200

csiph-web