シェルスクリプトの if文で複数の条件を指定する

シェルスクリプトでif文でAND条件やOR条件を複数指定したい場合ですが、以下のようにすればOKです
if文でAND条件の場合AND条件では「条件1 -a 条件2」と条件を「-a」を付与して続け ...
Windows 10でTFTPクライアントを利用する

ネットワーク機器のconfigの取得やファームウェアのアップロードでTFTPを使いたい機会がありました。
フリーソフトを使わずにWindowsの標準機能で利用する事にしました ...
Gmail スレッド表示で新しい順にする [Gmail reverse conversation]

Gmailでスレッド表示でメールを使用していると、同じメールはスレッドになるのですがメールの並び順が古いのが最初になり新しいのが下の方になります。長いスレッドだと一番新しいメールを辿るだけで大変です。
スレッド表示で新しい ...
Thunderbirdの折り返しの行数を変更する

Thunderbirdで標準でメールを見たり書いたりした場合、全角で36文字(半角で72文字)で折り返しされます。
他のメーラーやGmailと比べると折返しされる行数が少ないので、折返しの行数を変更してみます
設定 ...
CentOS 7.x 系でiptablesを利用する

CentOS 7系では、F/Wは「firewalld」に変わっています。CentOS 6系利用した「iptables」を利用したい場合は、firewalld を停止してiptables ...
仮想マシンの時刻がずれが生じた場合(hwclock)

クラウドで運用しているサーバーで時刻が10分ほどずれているサーバーがありました。このクラウドではntpdやchronyで時刻同期をおこなっても、上位のどこかでNTPポート(123ポート)が閉じているようでNTPサーバーで時刻同期ができ ...
WinSCPでファイルの転送時に上書き確認が出なくなった場合

WinSCPでファイルのアップロードした際に、同じファイル名があると通常では上書きするかの確認メッセージがでますが、知らない間にその上書き確認のメッセージが表示されなくなりました。
おそらく上書きするかの確認メッセージで、 ...
MySQLで、ユーザーのパスワード変更

MySQL、MariaDBでの登録していてるユーザーのパスワード変更するには、MySQLにログイン後に「SET PASSWORD 〜」と「mysqladmin」を利用する2つの方 ...
迷惑メール回避対策 DKIM設定【Postfix】

構築したメールサーバのメールがGmailで受信したメールが迷惑メール扱いになっていたりすることは無いでしょうか?
この対策として有効なのが、SPF(Send ...
Gmail、キャリア向けメール送信時に、Postfix 流量制限をする

docomo, au, softbank 等の携帯キャリア向けのメール、Gmailのメールなどは、大量のメールを送信されてると、「554:Transaction failed」等のエラーコードを応答してセッショ ...
wgetでcookieを利用して、ログイン認証のページにアクセスする

前回の「curlでcookie情報を取得・送信して利用する」と同様で、cookieを利用して、ログイン後のページにアクセスします。。今回は「wget」コマンドを使用してアクセスします。
curlでcookie情報を取得・送信して利用する

curlでログイン情報をPOST情報を送信してログインしたり、cookieを保存したり、送信する方法を説明します。
wgetコマンドで、cookie情報を保存・送信する場合「wgetで ...
systemctlでApache の「graceful」を使用する

CentOS 7.x , CentOS 8.xでは、サービスを起動する場合は、systemctlコマンドになっています。この状態でApacheのgracefulを使用すると「Unknown operation ‘grace ...
Apacheのバーチャルホストの一覧表示と内容確認

ApacheでVirtualHost で設定されているドメインの一覧や内容を確認するには、VirtualHost の設定ファイルを見ればわかりますが、複数のVirtualHost を設定している場合は、その設定ファイルを一個一個みるに ...
Apache 2.4系 DoS攻撃対策 mod_dosdetector 導入

以前にも同じような記事(DoS攻撃対策 Apacheモジュール mod_dosdetector 導入)DoS攻撃対策を書きましたが、内容的は同じ内容になります。こちらはCentOS 7系のサーバ ...