Linuxで特定のコマンドのスクリーンショットを撮る方法

Linuxで特定のコマンドのスクリーンショットを撮る方法

私はLinux(Ubuntu、Centos)システムを持っており、次の各コマンド出力のスクリーンショットをキャプチャしてそれを$HOME/screenshot/パスに保存する必要があります。

シェルスクリプトを使用して(Mobaxterm)端末を介してsshを使用できますか?システムが多いため、print screenこのオプションと同等のスクリプトが役に立ちます。

ls -al /etc/passwd
ls -al /etc/group
ls -al /etc/shadow
cat /etc/passwd
cat /etc/profile
ls -al /etc/hosts
ls -al /etc/services
ls -l /usr/bin/last
ls -al /etc/profile   

ベストアンサー1

import -window $WINDOW -compress JPEG "screenshot.jpg"$ WINDOWは、ここで取得したウィンドウIDであるか、デスクトップ全体にwmctrl使用できます。 ImageMagick パッケージの一部です。詳しくはマニュアルページをご覧ください。rootimport

おすすめ記事