Patching in linux.....
Hi,
How to patch a file/package? What is the command used to patch? I have encountered a 'zcat' command, is this one of the way to apply patches? Can someone list down the command? Thanks.. |
You use the patch command to patch source code files. Patches are generally delivered as a diff. If the patch is big, it is sometimes gzipped so it must be unzipped before use. A handy way to do this is:
zcat <patchfile> | patch This decompresses the file and passes the decompressed result to the patch command. The patch command has a number of options. I suggest you read its man page (type "man patch" with no quotes at the command line) for more details. |
Hi,
Thanks for the reply, btmiller. According to the manual, it didn't mention anything about zcat. So, does this mean that there are other ways to patch beside using zcat command? For example, just using patch -p patch-name.gz Is this correct? You said that the patch maybe available in gzipped(gz) if it too big. So how do I apply patch for some source file using a patch file zipped in bz2 extension? |
The zcat command has nothing to do with the patching process, it's just a convenient way to feed a gzipped file to the patch program (via a pipe |). If the patch had a bz2 extension you would have to use bzcat.
|
All times are GMT -5. The time now is 07:38 AM. |