3.3. その他のコマンド
3.3.1. End of File (EOF)
EOF コマンドを使って Ctrl+D シーケンスを用いて CLI シェルを終了します。
EOF
例3.10 EOF の例
[RHEVM shell (connected)]# EOF
3.3.2. システム機能の表示 (capabilities)
capabilties--features コマンドを使用して、全バージョンの機能や現バージョンの新機能を一覧表示します。
capabilities --features
例3.11 capabilities の機能
[RHEVM shell (connected)]# capabilities --features name : Search - Case Sensitivity description : Ability to specify whether a search query should ignore case, by providing a URL parameter url-parameters_set-parameter-name : case_sensitive url-parameters_set-parameter-context: matrix url-parameters_set-parameter-type : boolean :
3.3.3. 画面のクリア (clear)
clear コマンドを使って CLI 画面をクリアします。
clear
例3.12 clear の例
[RHEVM shell (connected)]# clear
3.3.4. 仮想マシンへの接続 (console)
console コマンドで、仮想マシンへのグラフィックコンソールを開きます。このコマンドは、仮想マシンの display-type パラメーターに従って、外部の VNC クライアントまたは SPICE クライアントのいずれかを開きます。
console [vm-id|vm-name]
例3.13 console の例
[RHEVM shell (connected)]# console RHEL6-Server
3.3.5. 入力の表示 (echo)
echo コマンドを使い、入力を画面に表示します。最後のシェルコマンドの出力を表示するには、$out 変数を使います。
echo [input]
例3.14 echo の例
[RHEVM shell (connected)]# echo "Example text!"
[RHEVM shell (connected)]# echo $out
3.3.6. CLI の終了 (exit)
exit コマンドを使って CLI を終了します。
exit
例3.15 exit の例
[RHEVM shell (connected)]# exit
3.3.7. スクリプトの実行 (file)
file コマンドを使って CLI スクリプトファイルを実行します。スクリプトとは、実行用のコマンド一覧が含まれるプレーンテキストのことです。
file [file-location]
例3.16 file の例
[RHEVM shell (connected)]# file /example/example-script
3.3.8. ヘルプの表示 (help)
help コマンドを使って CLI コマンドとリソースのヘルプを表示します。
help [command] [resource] [options]
例3.17 help の例
[RHEVM shell (connected)]# help
add コマンドのヘルプを取得します。
[RHEVM shell (connected)]# help add
vm リソースタイプの add コマンドのヘルプを取得します。
[RHEVM shell (connected)]# help add vm
3.3.9. ユーザーのコマンド履歴の表示 (history)
history コマンドを使用して、CLI シェルにおけるユーザーコマンドの履歴を表示します。
history
例3.18 history の例
[RHEVM shell (connected)]# history
例3.19 history --first の例
--firstn パラメーターで、最初から n 番目までのユーザーコマンド履歴を表示します。
[RHEVM shell (connected)]# history --first 5
例3.20 history --last の例
--lastn パラメーターで、最後から n 番目までのユーザーコマンド履歴を表示します。
[RHEVM shell (connected)]# history --last 5
3.3.10. CLI 情報の表示 (info)
info コマンドを使って環境接続の詳細やバージョン情報を表示します。
info
例3.21 info の例
[RHEVM shell (connected)]# info backend version: 3.1 sdk version : 3.1.0.4 cli version : 3.1.0.6 python version : 2.7.3.final.0 entry point : https://www.example.com:8443/api
3.3.11. 接続のテスト (ping)
ping コマンドで Red Hat Virtualization Manager への接続をテストします。このコマンドは、リモートリソースを取得して、接続の URL、ユーザー名、パスワードが正しいことを確認します。
ping
例3.22 ping の例
[RHEVM shell (connected)]# ping success: RHEVM manager could be reached OK.
3.3.12. シェルコマンドの実行 (shell)
shell コマンドを使って Linux シェルからコマンドを実行します。このコマンドは Red Hat Virtualization Manager シェルと連携してファイル管理タスクを実行できるようにします。
shell [vm-id|vm-name]
例3.23 shell の例
[RHEVM shell (connected)]# shell ls
[RHEVM shell (connected)]# shell touch example.txt
[RHEVM shell (connected)]# shell cp example.txt /example-dir/.
注記
!) を使用すると、shell の代替となります。例は次の通りです。
[RHEVM shell (connected)]# !touch example.txt
3.3.13. 直前のステータス表示 (status)
status コマンドを使用して、直近に実行されたコマンドの状況を表示します。
status
例3.24 status の例
[RHEVM shell (connected)]# status last command status: 0 (OK)
3.3.14. システムサマリーの表示 (summary)
summary コマンドを使用してシステムステータスのサマリーを表示します。
summary
例3.25 summary の例
[RHEVM shell (connected)]# summary hosts-active : 1 hosts-total : 2 storage_domains-active: 2 storage_domains-total : 3 users-active : 1 users-total : 1 vms-active : 1 vms-total : 1

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.