# Creating a patch



## linuxunix (Nov 9, 2011)

Hi Guys,

I need to create a patch on FreeBSD. How can I go for it?


----------



## graudeejs (Nov 9, 2011)

diff(1)


----------



## linuxunix (Nov 9, 2011)

Thanks. I had a folder which contained several *.c and *.h files.
I ran:


```
diff ../root/mfi/Makefile mfi/Makefile > patch.mfi
..
..
```
so on running for each file.

[cmd=]patch < patch.mfi[/cmd]


----------



## graudeejs (Nov 9, 2011)

Each file?

See *-r* option for diff


----------

