diff 用法

diff -Naur [from-file] [to-file] > [YourFileName.patch]
-N    In  directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory.
-a    Treat  all  files as text and compare them line-by-line, even if they do not seem to be text.
-u    Use the unified output format.
-r    When comparing directories, recursively compare any subdirectories found.

所以一般檔案內容異動只要 diff -u [from-file] [to-file] > [YourFileName.patch] 應該就可以了。

如果改的東西很多,應該就用 diff -Naur [from-file] [to-file] > [YourFileName.patch]



直行橫列,以及 line (列/行), column (欄), row (列)


Permission 權能/取用權; Permission denied 取用遭拒; Ask for permission 請求權能/取用權; Don't have the right permission to 沒有權能/無權