当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 8 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 致命的命令
帖子发表于 : 2009-06-27 19:44 

注册: 2007-11-12 18:09
帖子: 146
地址: 四川
送出感谢: 0 次
接收感谢: 0 次
http://wiki.ubuntu.org.cn/index.php?title=%E8%A7%A3%E5%86%B3%E6%96%87%E4%BB%B6%E5%90%8Dmp3%E6%A0%87%E7%AD%BE%E5%92%8C%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6%E5%86%85%E5%AE%B9%E7%9A%84%E4%B9%B1%E7%A0%81%E9%97%AE%E9%A2%98&variant=zh-cn

基于命令行的工具

* 需要用到的工具

sudo apt-get install convmv iconv python-mutagen

要转换文件编码请先进入要转换文件的目录

* 转换文件名由GBK为UTF8

convmv -r -f cp936 -t utf8 --notest --nosmart *

* 转换文件内容由GBK到UTF8

iconv -f gbk -t utf8 $i > newfile

* 转换 mp3 标签编码

find . -iname "*.mp3" -execdir mid3iconv -e GBK {} \;

注意:保证自己对需转换文件有写权限

执行了红色命令后就变成这样了:
第一张图的右边本来是有几个文件夹的,现在居然没有了!
图二中文乱码
图三休眠,刮起都没有了!




哪位大人帮帮我,完全找不到解决的办法。
那个wiki的命令应该删除了,-r递归简直是误导人!


附件:
Screenshot.png
Screenshot.png [ 67.69 KiB | 被浏览 1800 次 ]

Screenshot-1.png
Screenshot-1.png [ 228.17 KiB | 被浏览 1796 次 ]

Screenshot-2.png
Screenshot-2.png [ 83.69 KiB | 被浏览 1770 次 ]

页首
 用户资料  
 
2 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-27 19:59 
头像

注册: 2006-04-12 20:05
帖子: 8495
地址: 杭州
送出感谢: 0 次
接收感谢: 8
引用:
要转换文件编码请先进入要转换文件的目录
,这句没看到吧?再执行个
代码:
convmv -r -f utf8 -t cp936 --notest --nosmart *
试试吧~死马当活马了~


_________________
关注我的blog: ε==3


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-27 20:04 
头像

注册: 2007-04-25 13:12
帖子: 2838
送出感谢: 0 次
接收感谢: 0 次
先别notest看看


_________________
♜♞♝♛♚♝♞♜
♟♟♟♟♟♟♟♟
♙♙♙♙♙♙♙♙
♖♘♗♕♔♗♘♖

☠☯⚔⚓☣☦☃☕
☹☻☪☭☬⚖⚛⚜
ℜℳℬ™ ℋℯℓ℘ ℳℭ
sƂɐʍ рǀɹoʍ əɥʇ oS


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-27 20:06 
头像

注册: 2006-07-02 11:16
帖子: 12522
地址: 廣州
送出感谢: 0 次
接收感谢: 8
应该先用 dry-run 方式测试一下,没问题再转啊..


_________________
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-27 21:40 

注册: 2007-11-12 18:09
帖子: 146
地址: 四川
送出感谢: 0 次
接收感谢: 0 次
bones7456 写道:
引用:
要转换文件编码请先进入要转换文件的目录
,这句没看到吧?再执行个
代码:
convmv -r -f utf8 -t cp936 --notest --nosmart *
试试吧~死马当活马了~

就是粗心啊,没看见,那个我已经是过了,我的想法是既然可以cp936到utf8,就可以反过来utf8到cp936,但是运行结果:



娑樺鐞/2006-12閼板啳鐦/閸楁洜澧栭張鍝勭杽妤犲本鍨氱紒锟�(1).prn"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閸楁洜澧栭張/婢堆呯堪閵嗕焦鏆€濡楀牄鈧浇顔夌粙澶哥瑢閺佹瑥顒熸潻娑樺鐞/2006-12閼板啳鐦/閸楁洜澧栭張鍝勭杽妤犲本鍨氱紒锟�.xls"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閸楁洜澧栭張/婢堆呯堪閵嗕焦鏆€濡楀牄鈧浇顔夌粙澶哥瑢閺佹瑥顒熸潻娑樺鐞/2006-12閼板啳鐦/閸楁洜澧栭張楦库偓鍐槸A閸楅鐡熷锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閸楁洜澧栭張/婢堆呯堪閵嗕焦鏆€濡楀牄鈧浇顔夌粙澶哥瑢閺佹瑥顒熸潻娑樺鐞/2006-12閼板啳鐦/閸楁洜澧栭張楦库偓鍐槸B閸楅鐡熷锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閸楁洜澧栭張/婢堆呯堪閵嗕焦鏆€濡楀牄鈧浇顔夌粙澶哥瑢閺佹瑥顒熸潻娑樺鐞/2006-12閼板啳鐦/鐠囧墽鈻奸幋鎰摋閸欏﹨鐦崡宄板瀻閺嬫劖濮ら崨锟� .xls"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閺佹澘鈧硞婢跺秳绡勬0妯圭瑢鐎圭偤鐛欐0/閺佹澘鈧壈顓哥粻妤佹煙濞夋棿婢跺秳绡勬0锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閺佹澘鈧硞婢跺秳绡勬0妯圭瑢鐎圭偤鐛欐0/閺佹澘鈧壈顓哥粻妤佹煙濞夋棿婢跺秳绡勬0妯肩摕妫版顩﹂悙锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/鐠囧墽鈻肩拋鎹愵吀鐠у嫭鏋/LINUX閸掓繆鎹f禒锝囩垳閻ㄥ嫬鍨庨弸锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/鐠囧墽鈻肩拋鎹愵吀鐠у嫭鏋/閺堫剛顫栫拠鍓р柤鐠佹崘顓哥拠瀛樻娑旓箒顫�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/鐠囧墽鈻肩拋鎹愵吀鐠у嫭鏋/鐠侊紕鐣婚張铏圭矋閹存劕甯悶鍡楊槻娑旂姵褰佺痪锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閺傛澘缂撻弬鍥︽婢/鐎圭偤鐛欑粻鍙樺▏閻劏顕╅弰锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閺傛澘缂撻弬鍥︽婢/鐎圭偤鐛欓幎銉ユ啞/閹恒儱褰涢幎鈧張顖氱杽妤犲本濮ら崨濠兡侀弶锟�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3/閺傛澘缂撻弬鍥︽婢/鐎圭偤鐛欓幎銉ユ啞/鐎圭偤鐛欓幎銉ユ啞娑撳﹣姘﹀銉╊€�.doc"
cp936 doesn't cover all needed characters for: "婵℃鐭傚/閺堫亜鎳¢崥宥嗘瀮娴犺泛銇� 3"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺堫亜鎳¢崥锟�1.c"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺堫亜鎳¢崥锟�.c"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺堫亜鎳¢崥锟�.cpp"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺傜増鏋冩禒锟� 2.c"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/Output - 缂傛牞鐦�.c"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺傛澘缂� 閺傚洦婀伴弬鍥ㄣ€�.c"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€�.ncb"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€�.dsp"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€�.opt"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€�.dsw"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€�.plg"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/Debug/閺佺増宓佺紒鎾寸€�.pch"
cp936 doesn't cover all needed characters for: "缂傚倹鐗滈埢/閺佺増宓佺紒鎾寸€/閺佺増宓佺紒鎾寸€/Debug/閺佺増宓佺紒鎾寸€�.pdb"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/瀹搞劋姹� - J.mp3"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閸忚泛鐤勯幋鎴滅閻╂挳鍏橀幆鍐差嚠娴g姾顕�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/娑撳秴鐣弫瀵告畱閺冨绶�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/娴犳挻婀ス鏄忋€�-鐎涙瑧鍤傛慨锟�-Tonight,I Feel Close to you.mp3"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閸楁瀚垫俊鍫濐洯 - 閻瓨妾�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/娴笺倕绺�1999.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/姒涙垶顒熸竟锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閸欒櫕澧滄潏锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/娴g姵妲搁幋鎴犳畱楠炲摜顩撮崥锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/濞村嘲褰�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/濮圭喖鍎�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閹孩鐗�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/妤傛绻� - 閼界柉濮虫禍锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閻氭粈绗夐柅锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閸欘偄顫忔慨锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閼芥帒鏀�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/妤傛鎻�00Stephanie-Friends.mp3"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閸ф劕婀宄板經閻ㄥ嫰鍋呯€靛湱鏁烘總锟�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/婢垛晙绗�.ogg"
cp936 doesn't cover all needed characters for: "闂傚﹤鍘栫粻/閻滃瀚㈤悶绛圭礊鏉╁嘲顔� .mp3"
To prevent damage to your files, we won't continue.
First fix this or correct options!
天啊!天啊!


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-28 0:29 
头像

注册: 2009-04-11 23:46
帖子: 4029
系统: Arch Linux
送出感谢: 11
接收感谢: 110
原因已查明。经历了如下变换
代码:
Source   Target
UTF-8   cp936
cp936   UTF-8
Unicode   UTF-8

请关注第四行。
需要进行以下变换:
代码:
Source   Target
UTF-8   Unicode


_________________
我的博客 http://blog.lilydjwg.me/
Dropbox,你值得拥有。
提问的智慧
Arch Linux 中文论坛

我的vimrc: http://git.io/vimrc


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-28 19:45 

注册: 2007-11-12 18:09
帖子: 146
地址: 四川
送出感谢: 0 次
接收感谢: 0 次
lilydjwg 写道:
原因已查明。经历了如下变换
代码:
Source   Target
UTF-8   cp936
cp936   UTF-8
Unicode   UTF-8

请关注第四行。
需要进行以下变换:
代码:
Source   Target
UTF-8   Unicode


yanglinxin@yanglinxin-laptop:~$ convmv -r -f UTF-8 -t unicode *
Your Perl version has fleas #37757 #49830
Starting a dry run without changes...
Unknown encoding 'Internal' at /usr/bin/convmv line 540
yanglinxin@yanglinxin-laptop:~$

convmv --list里面没有Unicode这个编码!


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 致命的命令
帖子发表于 : 2009-06-28 20:24 
头像

注册: 2009-04-11 23:46
帖子: 4029
系统: Arch Linux
送出感谢: 11
接收感谢: 110
引用:
convmv --list里面没有Unicode这个编码!

的确没有。所以我的那个乱码文件还没解决(看了本贴后测试了一下)
Unicode不是一种编码。我也不知道这个软件是怎么搞的,建议以后折腾这个的时候小心为妙。
你上网查一下Unicode和UTF-8的关系吧,然后试着自己写个程序搞定它。(我要考试没时间)


_________________
我的博客 http://blog.lilydjwg.me/
Dropbox,你值得拥有。
提问的智慧
Arch Linux 中文论坛

我的vimrc: http://git.io/vimrc


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 8 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译