linux

Find Version on Redhat/Linux

[root@etlhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.9 (Ootpa)

[root@etlhost ~]$ hostnamectl
   Static hostname: etlhost
         Icon name: computer-vm
           Chassis: vm
        Machine ID: a26100fbf8cc4c3fa090ca5cac4c4543
           Boot ID: 1d2988a61acc476aaad6144d2ad420af
    Virtualization: oracle
  Operating System: Red Hat Enterprise Linux 8.9 (Ootpa)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
            Kernel: Linux 4.18.0-513.11.1.el8_9.x86_64
      Architecture: x86-64

# df -hT

ファイルシス                             タイプ   サイズ  使用  残り 使用% マウント位置
/dev/mapper/vg_root-lv_root      xfs           99G     87G  12G   88% /
devtmpfs                                 devtmpfs     63G         0   63G     0% /dev
tmpfs                                       tmpfs           63G    8.0K  63G     1% /dev/shm
tmpfs                                       tmpfs           63G    1.5G  62G     3% /run

# du -sh log

448M log


# yum whatprovides libodbc.so.2

読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
unixODBC-2.3.1-10.el7.i686 : A complete ODBC driver manager for Linux
リポジトリー        : RHEL7_x86_64
一致          :
Provides    : libodbc.so.2

unixODBC-2.3.1-11.el7.i686 : A complete ODBC driver manager for Linux
リポジトリー        : RHEL7_x86_64
一致          :

Provides    : libodbc.so.2


# /var/log/messages

linux のsyslogの出力先。


# cpu & memory

redhat memory(kbytes)

# free -m
              total        used        free      shared  buff/cache   available
Mem:         338408        5048      329535        1162        3825      330470
Swap:          1023           0        1023

# free
              total        used        free      shared  buff/cache   available
Mem:      346530656     5168336   337444292     1190032     3918028   338402444
Swap:       1048572           0     1048572

# grep physical.id /proc/cpuinfo | sort -u | wc -l
12
# grep cpu.cores /proc/cpuinfo | sort -u
cpu cores : 1
# grep processor /proc/cpuinfo | wc -l
12

numfmt --to=iec

$ echo 36004347
36004347
$ echo 36004347 | numfmt --to=iec
35M

file大きい順

# find . -type f -name "*.*" -print0 | xargs -0 ls -la | sort -nr -k5 | head -10
-rw-rw-rw- 1 btusr dgrp 3897679  7月  9 12:44 ./ABCIS6200_tsiims07_JOB_20190709124251.log
-rw-rw-rw- 1 btusr dgrp 2081182  7月  9 19:37 ./ABCOO6110_JOB_20190709152214.log
-rw-rw-rw- 1 btusr dgrp 1138551  7月  9 12:37 ./ABCIS6200_tsiims03_JOB_20190709123549.log
-rw-rw-rw- 1 btusr dgrp  957963  7月  9 19:22 ./ABCOO1100_JOB_20190709143739.log

# find . -type f -name "*.*" -print0 | xargs -0 ls -la | sort -nr -k5 | head -10 | numfmt --to=iec --field=5
-rw-rw-rw- 1 btusr dgrp    3.8M  7月  9 12:44 ./ABCIS6200_tsiims07_JOB_20190709124251.log
-rw-rw-rw- 1 btusr dgrp    2.0M  7月  9 19:37 ./ABCOO6110_JOB_20190709152214.log
-rw-rw-rw- 1 btusr dgrp    1.1M  7月  9 12:37 ./ABCIS6200_tsiims03_JOB_20190709123549.log
-rw-rw-rw- 1 btusr dgrp    936K  7月  9 19:22 ./ABCOO1100_JOB_20190709143739.log

パスワード変更日を表示する

chage -l user01
最終パスワード変更日                :10月 10, 2019パスワード期限:                     1月 8, 2020パスワード無効化中                    : なしアカウント期限切れ                        : なしパスワードが変更できるまでの最短日数        : 1パスワードを変更しなくてよい最長日数        : 90パスワード期限が切れる前に警告される日数        : 7

コメント

人気の投稿