linux
patch
Basic example to use "patch" command.
diff -Naur <absolute path of old file > <absolute path of new file>
# create a reverse patch file (just swap new and old file) diff -Naur <absolute path of new file> <absolute path of old file>
patch -r- -p0 -d / -N -i <absolute path of patch file> # create a backup patch -b -r- -p0 -d / -N -i <absolute path of patch file>
patch -R <absolute path of patched file> <absolute path of patch file>
Or, use "reverse patch file" to patch.
for i in *.orig; do base=`basename ${i} .orig` mv $i $base done
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up