dateコマンドで曜日を取得する

下記のように「SELECT * FROM 〜〜 INTO OUTFILE 〜〜」でMySQLのデータをCSVファイルにエクスポートした場合、「Null」を含 ...
ファイル内の特定の文字を含む行を削除する

ファイル内で特定の文字列を含む行を削除するには、「awk」, 「grep」 , 「sed」コマンドで削除できますが、今回は「sed」コマンドを利用した場合の方法を紹介します」
下記 ...
cpコマンドで確認なしでコピー

通常ではcpコマンドはコピーする際にcp -f (コピー元) (コピー先)として確認不要でコピーしても、下記のように確認コマンドが出る場合あります
$ cp -f hoge.txt ...空のディレクトリを削除する方法

ファイルが何も入っていない空のディレクトリがある場合、lsコマンドでディレクトリの内容を確認してファイルが無ければ削除するって事を手動でやっていると時間ばかりかかるので、findコマンドで空 ...
Ubuntuで標準のエディタをvimに変更する

Ubuntuをセットアップ後にCronの設定をしようすると「nano」が起動して、いつもは「vim」なのでショートカットキーが違うので保存とかするだけでも大変でした。このエディタを変更する方法を紹介します
「select- ...
サービス・プロセスの起動確認するシェルスクリプト

特定のプロセスやサービスの起動を確認して落ちていれば起動するシェルスクリプトです。
シェルスクリプトの流れは、psコマンドでプロセスを確認して、wcコマンド起 ...
Ubuntuでuseaddでホームディレクトリができない

最近、UbuntuのOSをインストールして使う機会があって数年ぶり触ってみましたが、Redhat系と違い戸惑うことが多かったので、初歩的ですが躓いた箇所をブログに上 ...
Ubuntu 15 でマウントすると「mount: unknown filesystem type ‘vboxsf’」 のエラー表示 [VirtualBox]

VirtualBoxでUbuntu15.04をインストールして共有フォルダをマウントすると「mount: unknown filesystem type ‘vboxsf’」のエラーが表示されました。
Ubuntuは、仮 ...
lsコマンド 容量を見やすい単位で表示(MB,GBなど)

lsコマンドなどで容量を自動でMB,GBなど見やすい単位で表示にする方法は、オプションで「h」を使用します
通常ですと、以下のようにバイト単位で表示されます
digコマンドでネームサーバーを指定する

Linuxのdigコマンドで「ネームサーバーを指定する」方法です
ドメインを変更した際になどに利用する場合があるかとおもいます
簡単なオプションですが、いつも利用する場合に忘れてしまいます
KVM・ブリッジネットワーク構成(Ubuntu10.10)

Ubuntu10.10でKVMのブリッジネットワーク構築方法
1.必要なパッケージをインストール
$ sudo apt-get install libcap2-bin qemu bridge-utils2. C ...
KVM インストール(Ubuntu10.10)

仮想化環境をESXiからKVMに移行したので、Ubuntu10.10でもKVMインストール方法
1.関連パッケージをインストール $ sudo apt-get install kvm qemu-kvm libvirt-bin u ...Ubuntu10.10 初期設定

仮想環境は、ESXiを利用していたが、諸事情によりKVMに移行することにしました。OSは、Ubuntu 10.10を利用します。
インストール時の初期設定のメモを一旦書き留めておきます
Dropboxを導入...
Oracle VM VirtualBox

Oracleに買収されて、VirtualBoxの名前が、「Oracle VM VirtualBox」に変わりましたね
さっそく、ubntu10.04に、VirtualBoxのリポジトリを追加してインストールしてみました。
gedit のカスタマイズ (文字化け対策と正規表現)

Ubuntu のGUI操作(Xwindow)で、使うテキストエディタは「gedit」を使っています。Windowsでは、「秀丸」を使っているが、gedit の非常に使いにくい。
機能が少ないので軽くていいのだが、正規表現が ...