convmv 介紹
發文者為 Tsukino Usagi 於 六月 20, 2006
在 Linux 下要轉換檔案內容的文字編碼可以用 iconv 指令, 但如果要轉換「檔名」的編碼, 有 convmv 這支程式可以用.
下載:
$ wget http://j3e.de/linux/convmv/convmv-1.09.tar.gz
安裝:
$ tar zxvf convmv-1.09.tar.gz
$ cd convmv-1.09
$ sudo make install
convmv 這個檔其實是一支perl script, 所以 make install 即可, 若沒有主機的 root 權限也可以直接執行.
轉換檔名編碼, 以 UTF-8 轉換成 BIG5 為例:
$ convmv -f UTF-8 -t BIG5 blahblah.txt
列出可以用的編碼:
$ convmv --list
轉換檔名中的 %xx 這種 16 進位的編碼:
$ convmv --unescape blah%20blah.txt
把檔名中的字母全轉換成小寫:
$ convmv --lower BLAH.txt
要注意的地方是它預設只會把轉換的結果秀出來, 要再加上 --notest 參數才會真正去改檔名.
另外幾個用到的參數是 -r 會連子目錄的檔案一起轉換, -i 是互動模式, 一個一個檔案詢問是否轉換等等, 可以用 --help 參數看說明.


lancetw的新天地 » 轉換編碼利器 convmv 說
[...] 參考: http://wiki.debian.org.tw/index.php/Unicode 小兔的筆記本 » Blog Archive » convmv 介紹 好用的轉碼工具 convmv – CreMaker’s in-life Blog convmv & iconv – 無語録むごろく – by chongmeng var linkStyle = “font-size:0.8em;font-family: verdana, arial, sans-serif;”; var linkClass = “citation”; var frameUrlCSS = “http://blochy.com/lancetw/blog/wp-content/themes/plain-vanilla/style.css”; var iframeStyle = “width: 120px;height:1.4em;border: 0px”; escapedStyle = encodeURIComponent(linkStyle); escapedClass = encodeURIComponent(linkClass); escapedUrlCSS = encodeURIComponent(frameUrlCSS); function writeCitationsFrame(permanentLink){ document.write(’Linking posts’); } 類別: [...]
Hao’s Blog » Blog Archive » 在Linux 中, 將檔名由big5 轉換utf8 說
[...] ,則用下列命令 convmv -f big5 -t utf8 -r –notest /目錄名 這裡有介紹用法: (1) http://usagiblog.wordpress.com/2006/06/20/convmv-%E4%BB%8B%E7%B4%B9/ (2) [...]