LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't find file to patch (https://www.linuxquestions.org/questions/linux-newbie-8/cant-find-file-to-patch-4175576197/)

iFunction 03-31-2016 11:41 AM

Just read your post, Grail, and that in itself has just cleared up and verified that patch works where it is. Thanks.

grail 03-31-2016 01:07 PM

I would mention that if you read the man page it does have a good little example about using the -p option, but the breakdown is that it strips off leading slashes based on the value assigned (ie, 0 would be the full path and 1 would make it relative to the current directory and so on). So depending on where you call the patch from (where the actual patch file is is irrelevant) you need
the path to the file to be patched to be the same. So in your example you could put a boot directory in your test directory and place the file to be changed in there and create the patch.
the issue then becomes if you set it to 1 and as boot sits directly under the root directory, you would need to be calling the path command from within / ... hope that helps a little :)

iFunction 03-31-2016 02:00 PM

Yes it does, I have read the man pages actually, and I kind of get it, though it is a lot more complex than just using absolute paths in my opinion, but hey I'm still new to linux in my opinion. Thanks for helping me battle through this one.


All times are GMT -5. The time now is 03:09 AM.