这篇文章主要记录一些 linux 常用命令,以备查看。
一、Vim
vim 是一个常用的文本编辑命令,一些常用的命令大家应该都有使用,现在记录一些使用不是很频繁单偶尔会用到的一些命令;
1、vim 批量替换;有以下一个文件,我们将令狐冲替换为令狐少侠
[hui@hadoop201 ~]$ cat test.txt 小师妹之前很喜欢令狐冲 依琳一直很喜欢令狐冲 任盈盈也是一直很喜欢令狐冲 东方也是很喜欢令狐冲
小师妹之前很喜欢令狐少侠 依琳一直很喜欢令狐少侠 任盈盈也是一直很喜欢令狐少侠 东方也是很喜欢令狐少侠
命令为 :%s/冲/少侠/g
二、系统配置信息
查看cpu x核数和cpu信息
[hui@hadoop201 ~]$ less /etc/proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 85 model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz stepping : 4 microcode : 0x200004d cpu MHz : 2201.000 cache size : 14080 KB physical id : 0 siblings : 20 core id : 0 cpu cores : 10 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts bogomips : 4400.00 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual [hui@hadoop201 ~]$ cat /proc/cpuinfo |grep 'model name' model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz [hui@hadoop201 ~]$ cat /proc/cpuinfo |grep 'model name'|wc -l 40
标签:name,GHz,CPU,命令,4114,Linux,一些,model,2.20 From: https://www.cnblogs.com/wdh01/p/16854051.html