🖥️patch

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the patch command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ██████╗  █████╗ ████████╗ ██████╗██╗  ██╗
#                ██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██║  ██║
#                ██████╔╝███████║   ██║   ██║     ███████║
#                ██╔═══╝ ██╔══██║   ██║   ██║     ██╔══██║
#                ██║     ██║  ██║   ██║   ╚██████╗██║  ██║
#                ╚═╝     ╚═╝  ╚═╝   ╚═╝    ╚═════╝╚═╝  ╚═╝
                                                         
                                                         
                                                         
                                                        
# Patch one file
patch version1 < version.patch

# Reverse a patch
patch -R version1 < version.patch

# Patch all files in a directory, adding any missing new files
# -p strips leading slashes
$ cd dir
$ patch -p1 -i ../big.patch

# Patch files in a directory, with one level (/) offset
patch -p1 -r version1/ < version.patch

#==============================##==============================#
# CMD PATCH						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░