0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

自分用コマンドメモ

Last updated at Posted at 2017-02-15

ログイン中のユーザー確認

$ w
 10:19:13 up 2219 days, 13:53, 22 users,  load average: 0.00, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user1  pts/6    153.231.215.8    25Jan17 19days  0.01s  0.01s -bash
user2  pts/8    123.123.123.234   Mon18   15:46m  0.15s  0.00s -bash
user3  pts/10   :pts/34:S.0      08:50    3days  0.17s  0.17s /bin/bash
user4  pts/14   222.111.123.123    25Jan17 15:16m 25:36   4.11s command-hoge
user5  pts/15   :pts/34:S.1      08:50    3days  0.07s  1:05m command-hoge

表示項目
・ユーザ名
・端末名
・接続元IPアドレス
・ログイン時刻
・ユーザが操作を行っていないアイドル時間
・ユーザが実行したプロセスがCPUを使用した時間
・カレントプロセスが使用したCPU時間
・ユーザが現在実行しているプロセス

ログイン中の自分のIP確認

who am i | cut -d '(' -f 2 | sed -e 's/)//g'

依存関係を調べる

rpm -q --whatrequires git

ファイル/ディレクトリの圧縮・解凍

gzipはファイルを操作する

# 使用例
# 圧縮
$ gzip file
# 解凍
$ gzip -d file.gz

tarはファイルとディレクトリが操作できる

# 使用例
# gzip圧縮してアーカイブを作成する
$ tar zcfp archive.tar.gz dir
# gzip圧縮したアーカイブを展開する
$ tar zxfp archive.tar.gz
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?