freebsd:diff

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Порівняння попередніх версій Попередня ревізія
Наступна ревізія
Попередня ревізія
freebsd:diff [2023/06/10 21:45] – [Мій приклад] Methodfreebsd:diff [2025/03/30 13:54] (поточний) – [Мій приклад] Method
Рядок 41: Рядок 41:
 Ось мої нотатки: Ось мої нотатки:
  
-`# to create patch: +to create patch: 
-copy <directory> backup to something like <directory>.orig alongside it +  copy <directory> backup to something like <directory>.orig alongside it 
-cp -r <path_to>/<directory> <path_to>/<directory>.orig +  cp -r <path_to>/<directory> <path_to>/<directory>.orig 
-create/update/delete files/folders in <directory> until desired state is reached +  create/update/delete files/folders in <directory> until desired state is reached 
-change working directory to <directory> +  change working directory to <directory> 
-cd <path_to>/<directory> +  cd <path_to>/<directory> 
-create patch file alongside <directory> +  create patch file alongside <directory> 
-diff -Naru ../<directory>.orig . > ../file.patch+  diff -Naru ../<directory>.orig . > ../file.patch 
 # -N --new-file Treat absent files as empty. # -N --new-file Treat absent files as empty.
 +
 # -a --text Treat all files as text. # -a --text Treat all files as text.
 +
 # -r --recursive Recursively compare any subdirectories found. # -r --recursive Recursively compare any subdirectories found.
 +
 # -u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified context. # -u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified context.
  
-to apply patch+ 
-change working directory to <directory> +to apply patch change working directory to <directory> 
-cd <path_to>/<directory> +  cd <path_to>/<directory> 
-patch -s -p0 < <path_to>/file.patch+  patch -s -p0 < <path_to>/file.patch 
 # -s or --silent or --quiet Work silently, unless an error occurs. # -s or --silent or --quiet Work silently, unless an error occurs.
 +
 # -pN or --strip=N Strip smallest prefix containing num leading slashes from files. # -pN or --strip=N Strip smallest prefix containing num leading slashes from files.
  
-to undo patch (note that directories created by patch must be removed manually): +to undo patch (note that directories created by patch must be removed manually): 
-# change working directory to <directory> + 
-cd <path_to>/<directory> +  # change working directory to <directory> 
-patch -Rs -p0 < <path_to>/file.patch +  cd <path_to>/<directory> 
-# -R or --reverse Assume that patch was created with the old and new files swapped. +  patch -Rs -p0 < <path_to>/file.patch 
-# -s or --silent or --quiet Work silently, unless an error occurs. +  # -R or --reverse Assume that patch was created with the old and new files swapped. 
-# -pN or --strip=N Strip smallest prefix containing num leading slashes from files.`+  # -s or --silent or --quiet Work silently, unless an error occurs. 
 +  # -pN or --strip=N Strip smallest prefix containing num leading slashes from files.`
  
  
Рядок 100: Рядок 107:
  
 # make patch  # make patch 
-diff -Naru ./nodeny.orig ./nodeny > ../pon_r677_4.patch+diff -Naru nodeny.orig/ nodeny> ./pon_r710_01.patch
  
 # apply patch for nodeny.orig # apply patch for nodeny.orig
-patch -d nodeny.orig/ -Efu --posix -p1 < ./pon_r677_4.patch+cd /usr/local/nodeny.orig/ 
 +patch -d . -Efu --posix -p1 < ../pon_r710_01.patch
 </code> </code>