PATCH Commands Cheat Sheet

Here is a cli commands cheat sheet for PATCH command, you can use this as a quick reminder for basic commands with a brief description for each of the commands.

What is PATCH command?

Add some data here

        # To patch one file:
patch  < 

# To reverse a patch:
patch -R  < 

# To patch all files in a directory, adding any missing new files:
# -p strips leading slashes
$ cd dir
$ patch -p1 -i  

# To patch files in a directory, with one level (/) offset:
patch -p1 -r  < 
    

Check out the PATCH command documentation .


You can also check our MegaSh cheatsheet tool, that has 150+ searchable linux cheat sheets in one page, so you never forget a command as you work again

Check Also

Best AI tools list