CONVMV: perl 的批次檔案/目錄名稱轉碼

    iconv是好用的轉碼程式,但是對於批次轉目錄/檔案名稱時就有點麻煩,需要自己寫個小程式。不過其實免了,已有人開發了這個好用的PERL小程式叫做CONVMV

    下載點 http://www.j3e.de/linux/convmv/,目前最新版本為1.10

測試(僅列出結果)將filename目錄下的所有Big5檔名轉換為utf-8

$ convmv -f big5 -t utf-8 filename/*

實際轉檔

$ convmv –notest -f big5 -t utf-8 filename/*

MySQL 複製失敗

    按照官方說法只要MySQL Master的版本不比Slave新仍可以複製。由於Slave機器硬體更新系統亦從RH8升級到CENTOS5,內附MySQL為5.0版,直接將原來的BINARY資料庫直接複製過來使用,並未遇上短密碼的問題。但是網頁部分卻發生帳號無法登入的問題,目前仍無法解決。

    至於資料庫複製起初正常,但在Master新增某些資料時便會造成複製失敗。在拜過Google大神後,有人提到加大max_allow_packet後還是無法改善,看來只有更換回4.1一途了…

Centos 5 : Yum Update 無法升級 perl-5.8.8-10

進行yum update時出現以下錯誤

[root@mindman yum.repos.d]# yum upgrade perl
Loading “installonlyn” plugin
Setting up Upgrade Process
Setting up repositories
Reading repository metadata in from local files
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Package perl.i386 4:5.8.8-10.el5_0.2 set to be updated
–> Running transaction check

Dependencies Resolved

=========================================

Package Arch Version Repository Size
=========================================

Updating:
perl i386 4:5.8.8-10.el5_0.2 updates 12 M

Transaction Summary
=========================================

Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)

Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test

Transaction Check Error:
file /usr/lib/perl5/5.8.8/Getopt/Long.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Getopt-Long-2.36-1
file /usr/lib/perl5/5.8.8/newgetopt.pl from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Getopt-Long-2.36-1
file /usr/share/man/man3/Getopt::Long.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Getopt-Long-2.36-1
file /usr/lib/perl5/5.8.8/Test/Builder.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/lib/perl5/5.8.8/Test/Builder/Module.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/lib/perl5/5.8.8/Test/Builder/Tester.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/lib/perl5/5.8.8/Test/More.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/lib/perl5/5.8.8/Test/Simple.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Builder.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Builder::Module.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Builder::Tester.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Builder::Tester::Color.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::More.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Simple.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/share/man/man3/Test::Tutorial.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Test-Simple-0.70-1
file /usr/lib/perl5/5.8.8/Math/BigFloat.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/lib/perl5/5.8.8/Math/BigInt.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/lib/perl5/5.8.8/Math/BigInt/Calc.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/lib/perl5/5.8.8/Math/BigInt/CalcEmu.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/share/man/man3/Math::BigFloat.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/share/man/man3/Math::BigInt.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/share/man/man3/Math::BigInt::Calc.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/share/man/man3/Math::BigInt::CalcEmu.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigInt-1.86-1
file /usr/lib/perl5/5.8.8/Math/BigRat.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigRat-0.19-1
file /usr/share/man/man3/Math::BigRat.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Math-BigRat-0.19-1
file /usr/lib/perl5/5.8.8/bigint.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/lib/perl5/5.8.8/bignum.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/lib/perl5/5.8.8/bigrat.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/share/man/man3/bigint.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/share/man/man3/bignum.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/share/man/man3/bigrat.3pm.gz from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-bignum-0.21-1
file /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Sys/Syslog.pm from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Sys-Syslog-0.18-1
file /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Sys/Syslog/Syslog.so from install of perl-5.8.8-10.el5_0.2 conflicts with file from package perl-Sys-Syslog-0.18-1

Error Summary
————-
原來是因為安裝了 MailScanner 造成的 , MailScanner 內附的一些 perl 模組以 –force 方式安裝 , 因此簡單的解決方式就是以手動方式以 –force 參數安裝新版 perl , 若 yum 已將該檔案下載至 /var/cache/yum/updates/packages , 直接以

# rpm -Uvh –force /var/cache/yum/updates/packages/
perl-5.8.8-10.el5_0.2.i386.rpm

修改 /etc/yum.repos.d/rpmforge.repo ,加入不檢查清單

exclude=perl-MIME-Base64 perl-Test-Simple perl-Getopt-Long perl-Math-BigInt perl-Math-BigRat perl-bignum perl-Sys-syslog
重新執行 yum update

最後重新安裝 MailScanner 即可