1 |
for d in /proc/*;do [[ $d =~ /proc/[0-9]+ ]] && echo ${d#/proc/};done |
ls 可以list /proc …
DevOps
1 |
for d in /proc/*;do [[ $d =~ /proc/[0-9]+ ]] && echo ${d#/proc/};done |
ls 可以list /proc …
如何计算字符串中单词的数量,但是不使用wc? eg: [crayon-68462338ac8338026386 …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/bin/bash CGROUP_DIR=/sys/fs/cgroup/memory UNLIMITTED=9223372036854771712 read mem_total <$CGROUP_DIR/memory.limit_in_bytes read mem_used <$CGROUP_DIR/memory.usage_in_bytes mem_free=$((mem_total - mem_used)) read mem_swap_total <$CGROUP_DIR/memory.memsw.limit_in_bytes read mem_swap_used <$CGROUP_DIR/memory.memsw.usage_in_bytes swap_total=$((mem_swap_total - mem_total)) swap_used=$((mem_swap_used - mem_used)) swap_free=$((swap_total - swap_used)) if [[ $mem_total = "9223372036854771712" ]];then /usr/bin/free -h && exit fi printf "%20s%20s%20s\n" total used free printf "Mem:%16s%20s%20s\n" $((mem_total/1024/1024))M $((mem_used/1024/1024))M $((mem_free/1024/1024))M printf "Swap:%15s%20s%20s\n" $((swap_total/1024/1024))M $((swap_used/1024/1024))M $((swap_free/1024/1024))M |
cfdisk is a curses-based program for partitioning any h …
缘起 阿里云OSS比云硬盘要便宜很多,而且阿里云提供一个叫做ossfs的工具,可以将OSS挂载成本地文件系统, …
https://www.cnblogs.com/zhengah/p/5889340.html socat做Un …
Hello world: 解说: 先加载程序集 New-Object ShowDialog 参考: https …
索引滥用 表索引情况如下: 我们发现,buss_no 开头的索引就有三个,从名字上 …
https://geekeefy.wordpress.com/2017/10/07/4-ways-to-sen …
继续阅读“4 ways to send output to NULL in PowerShell – Geekeefy”
stat一个目录时卡死: (这个错误和十年前遇到的执行du就卡死的问题,如出一辙) dmesg 错误信息: & …