I am trying to patch a file.
The patch file is in the directory in which the list of files to be patched.
When I run commend
patch < file.patch
It prompts me
File to patch:
How to avoid this? What should I add in the patch file to automatically detect the filename that it should patch
diff -u), so it puts some filenames at the top thatpatchwill recognize. But, the filenames could bea/subdir/file1and your current directory is just abovesubdir. You may need to usepatch's-poption (e.g.patch -p1 < ...orpatch -p2 < ...). Adjust to suit-pXoption tellspatchto stripXcomponents of the path (slashes) from the left. If you get the error unable to finda/path/to/filename,File to patch:and you know the file is atpath/to/filenameon your system, you would usepath -p1to strip thea/from the beginning of the path allowingpatchto find the file to patch on your system.diff -ruN folder1/ folder2/ > patchfile.patch?