Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #80268
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Newsgroups | alt.os.linux |
| Subject | Re: patch a file with the patch command |
| Date | 2024-08-06 07:36 +0200 |
| Organization | A noiseless patient Spider |
| 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> |
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 | Next — Previous 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