-h 以合适的单位显示内存使用情况,最大为三位数,自动计算对应的单位值。单位有:
- B = bytes
- K = kilos
- M = megas
- G = gigas
- T = teras
- $free -h
- total used free shared buff/cache available
- Mem: 125G 24G 12G 42M 88G 99G
- Swap: 2.0G 415M 1.6G
du -h --max-depth=1 /home/jsy
- du -h --max-depth=1 /home/jsy
- 16K /home/jsy/.ssh
- 210M /home/jsy/ops
- 992M /home/jsy/diff
- 143M /home/jsy/tools
- 166M /home/jsy/.vscode-server
- 1.5G /home/jsy
进入到当前目录,通过 ls -lh
- $ls -lh
- total 284K
- -rwxr-xr-x 1 jiangshuangyan.jsy users 1.6K Oct 11 11:01 aone_task_report.sh
- -rw-r--r-- 1 jiangshuangyan.jsy users 230 Oct 11 11:01 biz.json
- -rw-r--r-- 1 jiangshuangyan.jsy users 11K Oct 11 11:01 BUILD
- -rw-r--r-- 1 jiangshuangyan.jsy users 1.5K Oct 11 11:01 build_options.py
- -rw-r--r-- 1 jiangshuangyan.jsy users 151 Oct 11 11:01 _build.spec
- drwxr-xr-x 2 jiangshuangyan.jsy users 4.0K Oct 11 11:01 conf
df -h
- $df -h
- Filesystem Size Used Avail Use% Mounted on
- devtmpfs 63G 0 63G 0% /dev
- tmpfs 63G 1.5M 63G 1% /dev/shm
- tmpfs 63G 2.5M 63G 1% /run
- tmpfs 63G 0 63G 0% /sys/fs/cgroup
- /dev/sda3 49G 41G 6.4G 87% /
- /dev/sda5 259G 48G 211G 19% /home
- /dev/nvme8n1p1 1.8T 77M 1.8T 1% /disk11
- /dev/nvme1n1p1 1.8T 5.8G 1.8T 1% /disk4
- /dev/nvme5n1p1 1.8T 71G 1.8T 4% /disk8
- /dev/sda2 976M 112M 798M 13% /boot
- /dev/nvme6n1p1 1.8T 14G 1.8T 1% /disk9
- /dev/nvme0n1p1 1.8T 53G 1.8T 3% /disk1