dos2unix 與 unix2dos 說明(報告工具)

sudo dos2unix -h  

sudo unix2dos -h

用來轉換dos與unix 文件中換行錯誤, 避免打開混亂的亂碼

sudo dos2unix -h  

用法: dos2unix [選項] [file ...] [-n infile outfile ...]

 --allow-chown         allow file ownership change

 -ascii                只轉換換行字元(預設)

 -iso                  在DOS 和ISO-8859-1 字元集間轉換

   -1252               使用Windows 1252 編碼頁(西歐)

   -437                使用DOS 437 編碼頁(US) (預設)

   -850                使用DOS 850 編碼頁(西歐)

   -860                使用DOS 860 編碼頁(葡萄牙)

   -863                使用DOS 863 編碼頁(加拿大法語)

   -865                使用DOS 865 編碼頁(北歐)

 -7                    轉換8 位元字元到7 位元空間

 -b, --keep-bom        keep Byte Order Mark

 -c, --convmode        轉換模式

   convmode            ascii, 7bit, iso, mac, 預設為ascii

 -f, --force           強制轉換二進位檔案

 -h, --help            顯示本說明文字

 -i, --info[=FLAGS]    display file information

   file ...            files to analyze

 -k, --keepdate        保留輸出檔時間

 -L, --license         顯示軟體授權

 -l, --newline         加入額外的換行

 -m, --add-bom         add Byte Order Mark (default UTF-8)

 -n, --newfile         寫入新檔

   infile              新檔模式中的原始檔案

   outfile             新檔模式中的輸出檔案

 --no-allow-chown      don't allow file ownership change (default)

 -o, --oldfile         寫入原檔案(預設)

   file ...            原檔模式中要轉換的檔案

 -q, --quiet           quiet mode, suppress all warnings

 -r, --remove-bom      remove Byte Order Mark (default)

 -s, --safe            略過二進位檔案(預設)

 -u,  --keep-utf16     keep UTF-16 encoding

 -ul, --assume-utf16le 假設輸入檔格式為UTF-16LE

 -ub, --assume-utf16be 假設輸入檔格式為UTF-16BE

 -v,  --verbose        verbose operation

 -F, --follow-symlink  依循符號連結轉換其目標檔案

 -R, --replace-symlink 取代符號連結為轉換後的檔案

                         (原連結目標檔案保持不變)

 -S, --skip-symlink    保持符號連結及其目標不變(預設)

 -V, --version         顯示版本號碼




留言

這個網誌中的熱門文章

用趨勢偵測 log4j

urlcrazy 真的很crazy