1.CPU物理处理器数
1 | cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l |
2.CPU核心数
1 | cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l |
3.CPU逻辑数
1 | cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l |
过滤目录下文件所包含的某个字段
1 | find ./ -type f | xargs grep "docker-registry.default.svc" | awk '{gsub(":"," ");print $1}' |