Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662
:::| 目前位置圖示目前位置:首頁圖示回首頁 | 主功能頁圖示相關問答
samba舊檔名big5轉換為UFT8,轉檔時會發生出現:resulting filename ibytes long (max: 255)

[日期]:2025/06/03  [瀏覽人數]:183

舊版本samba的檔名格式若是使用big5,在FREEBSD shell模式下看到的檔名會是亂碼,操作不便。

若換成新版本要將檔名格式轉換為utf8,可使用convmv

#cd /usr/ports/converters/convmv
#make install clean;

-r:含子目錄

-f:原格式

-t:新格式

convmv -r -f big5 -t utf8 /diskshare/share/*

上面指令只會模擬轉換,確定要轉換時加--notest

convmv --notest -r -f big5 -t utf8 /diskshare/share/*

如果中文檔名取得又臭又長時,在轉檔時會發生出現:resulting filename ibytes long (max: 255)

convmv是一個perl的檔案,放在/usr/local/bin/下

修改此檔,找到一行:

$maxfilenamelength=255;
將255改為1024,再重新轉檔,應該就能轉換完成。