Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #80265
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | alt.os.linux |
| Subject | Re: patch a file with the patch command |
| Date | 2024-08-05 23:05 +0200 |
| Message-ID | <lhct4kFt2soU1@mid.individual.net> (permalink) |
| References | <v8pvb6$iff4$1@dont-email.me> <lhbom2FnhvqU1@mid.individual.net> <v8qrch$qt2t$1@dont-email.me> |
On 05/08/2024 17.33, alex wrote: > > patch -p1 < ../from_org_to_revised.patch > > The parameter -p1 what is it for? > it's to remove the first level of directory as in my example the paths had been --- orgcopy/orig 2024-08-02 14:22:59.937683379 +0200 +++ revisedcopy/orig 2024-08-02 10:17:25.108469758 +0200 so -p1 would make it same as: --- orig 2024-08-02 14:22:59.937683379 +0200 +++ orig 2024-08-02 10:17:25.108469758 +0200 Say you had had: --- src1/dir/orig 2024-08-02 14:22:59.937683379 +0200 +++ src2/dir/orig 2024-08-02 10:17:25.108469758 +0200 and you are in the src1/dir applying the patch, you would like to remove two levels and use -p2, but if you had been in src1 then you would just use -p1. I hope that was understandable... -- //Aho
Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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