2014/04/08

ディレクトリ中のファイルの文字コード一括変換

ディレクトリ中のファイルの文字コード一括変換するには、 こんな感じ。 # find . -type f |xargs nkf -w --overwrite 数が多いときは、xargsに引を数をつける。 # find . -type f |xargs -n 10 nkf -w --overwrite

2014/03/31

Postfix SMTPauth on CentOS 5.2
プライベートCA,サーバ証明書
/etc/pki/tls/openssl.cnf

openssl-perlのインストール
/etc/pki/tls/misc/CA.pl

/etc/pki/tls/certs
#make server.key
#openssl rsa -in server.key -out server.key
#make server.csr
#openssl x509 -in server.csr -out server.pem -req -signkey server.key -days 365

DynabookSS RX1 Debianでサスペンド回避

DynabookSS RX1にDebianをインストールした。 パネルを閉じるとサスペンドしてしまうので、 /etc/UPower/UPower.conf で、 IgnoreLid=false を IgnoreLid=true とするとサスペンドしないみたい。 さて、サーバというか通信確認用端末としてサーバラックの中で すごしてもらえる準備が出来たかんじ。

2013/12/17

複数ファイルからの特定文字列の検索

find ./path -type f -print | xargs grep 'hoge'

2012/11/26

MySQLへのCSV取り込み

MySQLへのCSV取り込み. mysql> load data infile "/tmp/hoge.csv" replace into table table_name FIELDS terminated by ',' lines terminated by '\r\n' ignore 1 lines; ignoe 1 linesで1行目無視. terminated '¥r¥n'は環境による.

2012/01/05

Scientifc Linux 6.1でCA,証明書,SMTPauthなメモ

参考にしたURL.

http://d.hatena.ne.jp/shogo0809/20091216/1260985781
http://scientificsrv.com/postfix-tls.shtml

ちなみにScientifc Linux 6.1を入れたのはこんなマシン.
数年前に親用にソフマップで買ってCPU換装,メモリ増設などを
して半年ほど前に引退した機械.
ちょうど自分サーバのディスクから嫌なメッセージが届くように
なったので,急遽,一時的な代替用にセットアップ.そのうち
本番用は9800円で買ったML110で作るつもり.あくまで予定.

# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping : 7
cpu MHz : 2399.940
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts cid xtpr
bogomips : 4811.00
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 32 bits virtual
power management:

2011/11/29

ML110 G6

9800円だったので思わず買ってしまった...