# how to extract .gz patch

## StaraDama

i have this patch patch-2.6.8.1-lsd5.gz and i don't know how to extract it.

Thnx

----------

## cylgalad

```
gunzip patch-2.6.8.1-lsd5.gz
```

That will turn the compressed patch-2.6.8.1-lsd5.gz into uncompressed patch-2.6.8.1-lsd5

----------

## TheCoop

or you could just run:

```
patch -p1 < `gzcat patch-2.6.8.1-lsd5.gz`
```

(i think its something like that) to have it patched directly from the .gz file

----------

## senzacionale

yes exactly as you said

First, download a patch from somewhere, and move it to the /usr/src/linux directory (make sure /usr/src/linux links to the kernel you want to use). Now enter the /usr/src/linux directory:

cd /usr/src/linux

Extract the patch into the /usr/src/linux directory using your tool of choice.

There should now be a file called something like patch-2.x.x or patch-2.x.x-yy (where x stands for a version number, and yy stands for the initials of the patch or patchset, such as aa or ck) in the /usr/src/linux directory. To apply the patch to the kernel, run:

patch -p1 < patch-2.x.x

or

patch -p1 < patch-2.x.x-yy

SO IN SHORT WAY

cd /usr/src/linux

wget path

gunzip patch-2.6.8.1-lsd5.gz

patch -p1 < patch-2.x.x

or

patch -p1 < patch-2.x.x-yy

----------

## c0balt

ive found that 

patch -p1 < gzcat PATCH

sometimes doesnt work

Using:

gzcat/bzcat2 PATCH | patch -p1 

since then, works always

----------

