- Entire Directories When applying patches to entire directories, you have to set a "p level." The files to be patched are identified by path names which may differ between your computer and where the patch was created. The p level instructs patch to ignore p levels of the path name starting from the top. Inspect the patch file for file names. If you see a name like /home/kdorman/package/src/net/http.c and you are working in a directory that contains net/http.c, use
patch -p5 < baz.patchcounting once for every slash up to the directory that matches.
- Remove Patch To remove a patch, use the -R flag:
patch -p5 -R < baz.patch
0Creating patches with diff