Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Node:Invoking patch, Next:, Previous:Invoking diff3, Up:Top

Invoking patch

Normally patch is invoked like this:

patch <patchfile

The full format for invoking patch is:

patch options... [origfile [patchfile]]

You can also specify where to read the patch from with the -i patchfile or --input=patchfile option. If you do not specify patchfile, or if patchfile is -, patch reads the patch (that is, the diff output) from the standard input.

If you do not specify an input file on the command line, patch tries to intuit from the leading text (any text in the patch that comes before the diff output) which file to edit. See Multiple Patches.

By default, patch replaces the original input file with the patched version, possibly after renaming the original file into a backup file (see Backup Names, for a description of how patch names backup files). You can also specify where to put the output with the -o file or --output=file option; however, do not use this option if file is one of the input files.


 
 
  Published under the terms of the GNU General Public License Design by Interspire