便利コマンド
このサイトでよく使われるコマンドをまとめておくページ。これを使うには~/.bashrcに追加する。
_ デーモンのリスタート
_ restart-apache2 (apache2のリスタート)
alias restart-apache2='sudo /etc/init.d/apache2 restart'
_ restart-postfix (postfixのリスタート)
alias restart-postfix='sudo /etc/init.d/postfix restart'
_ ufw (ufwのリスタート)
alias restart-ufw='sudo /etc/init.d/ufw restart'
_ 暫定ログモニター
_ apache2のログモニター(全部)
alias log-monitor-apache2='tail -f /var/log/apache2/*.log'
_ apache2のログモニター(エラーのみ)
alias log-monitor-apache2error='tail -f /var/log/apache2/*error.log'
_ mailのログモニター
alias log-monitor-mail='tail -f /var/log/mail.err /var/log/mail.info /var/log/mail.log /var/log/mail.warn'
_ IPアドレス関係
_ ip-getfromdns(ルータが持つDNSサーバに対してmyhost.example.comを問い合わせる。)
alias ip-getfromdns='dig @192.168.0.1 myhost.example.com +short'
_ ip-getreal(外向きアドレスを取得する。http://dyndns.com利用)
alias ip-getreal='w3m -dump http://checkip.dyndns.com/'
プロキシが設定されてないことが前提
Link: MenuBar(2470d)
Last-modified: 2008-11-09 (日) 06:52:48 (5647d)