2005-11-07 Mon
Adjust Clock
- Source
#!/bin/sh # Adjust Clock # Yoshiki SATO [2002/02/03] /usr/sbin/ntpdate 133.100.9.2 /bin/sleep 3 /sbin/hwclock --systohc echo "Hardware Clock : `hwclock --show`"
カテゴリ: [Shell Script]
[ 固定リンク ]
2005-01-03 Mon
シェルスクリプト リファレンス & Tips
- Reference
シェルスクリプト リファレンス & Tips
http://www.rhythm-cafe.com/kb/shell/
カテゴリ: [Shell Script]
[ 固定リンク ]
2004-10-25 Mon
シェルスクリプトの基礎
- Reference
Running System V - シェルスクリプトの基礎
http://warp.syns.net/10/
カテゴリ: [Shell Script]
[ 固定リンク ]
2004-05-31 Mon
秒間隔でコマンドを繰り返し実行し続ける
- Summary
netstat -i を1秒間隔で自動実行
- while と sleep を使ってシェルスクリプトを書く
$ while true; do date; netstat -i; sleep 1; clear; done;
- watch コマンドを使う
$ watch --interval 1 netstat -i
- Reference
Landscape - 2004-05-28
http://sonic64.com/2004-05-28.html#2004-05-28-1
カテゴリ: [Shell Script]
[ 固定リンク ]
2004-05-31 Mon
ディレクトリ中のファイルサイズ合計値を バイト表示
- Summary
Windowsのフォルダのプロパティ表示のように,ファイルサイズの合計値などを表示させたい.
duではファイルが使用しているブロックサイズを表示するのでダメ.
- ファイルの個数 と ファイルサイズを表示.ファイルサイズは3桁ごとにカンマで区切る.
$ find -type f -printf "%s\n" |perl -ne '$i++; $byte += $_; $str = "\r$i files, $byte byte"; $str =~ s/(\d{1,3})(?=(?:\d\d\d)+(?!\d))/$1,/g; print $str'
- Reference
Landscape - 2004-05-26
http://sonic64.com/2004-05-26.html#2004-05-26-1
カテゴリ: [Shell Script]
[ 固定リンク ]
最終更新時間: 2008-09-05 14:14