home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 106,357 of 107,822   
   alex to All   
   Re: patch a file with the patch command   
   06 Aug 24 07:39:23   
   
   From: 1j9448a02@lnx159sneakemail.com.invalid   
      
   Il 05/08/24 23:05, J.O. Aho ha scritto:   
   >   
   > it's to remove the first level of directory as in my example the paths   
   > had been   
      
   ├── orig   
   │   └── file.txt   
   └── revised   
        └── file.txt   
      
   $ cat orig/file.txt   
   buggated   
      
   $ cat revised/file.txt   
   fixed   
      
   $ diff -ur orig/ revised/ > file.patch   
      
   ├── file.patch (FILE CREATED)   
   ├── orig   
   │   └── file.txt   
   └── revised   
        └── file.txt   
      
   $ cd orig/   
      
   $ patch < ../file.patch   
   patching file file.txt   
      
   $ cd ..   
      
   $ cat orig/file.txt   
   fixed   
      
   To notice   
      
   $ patch < ../file.patch   
      
   Even if it was not used -p1 it worked equally.   
      
   Why?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca