查看邏輯cpu個數:cat /proc/cpuinfo | grep “processor” | wc -l
查看物理cpu個數:cat /proc/cpuinfo | grep “physical id” | sort | uniq | wc -l
查看每個物理cpu的核數cores:cat /proc/cpuinfo | grep “cpu cores”
如果所有物理cpu的cores個數加起來小於邏輯cpu的個數,則該cpu使用了超線程技術。查看每個物理cpu中邏輯cpu的個數:cat /proc/cpuinfo | grep “siblings”
20.把所有的文件夾的文件名含有空格的,把空格去掉
chgSh^eJ
G_ze3Hto
ISA is supported
PCI is supported
PC Card (PCMCIA) is supported
--
System Slot Information
Designation: PCI Slot J11
Type: 32-bit PCI
Current Usage: In Use
--
System Slot Information
Designation: PCI Slot J12
Type: 32-bit PCI
Current Usage: In Use
--
System Slot Information
Designation: PCI Slot J13
Type: 32-bit PCI
Current Usage: In Use
--
System Slot Information
Designation: PCI Slot J14
Type: 32-bit PCI
Current Usage: Available
Interesting ports on bogon (192.168.1.29):
Not shown: 1677 closed ports
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn
445/tcp open microsoft-ds Microsoft Windows XP microsoft-ds
MAC Address: 70:5A:B6:09:45:FA (Unknown)
Device type: general purpose
Running: Microsoft Windows NT/2K/XP
OS details: Microsoft Widows XP SP2
Service Info: OS: Windows
(1)# cat test.txt |tr -d '^M' >test.new
(2).# sed -i 's/^M//g' test.txt
(3)# dos2unix test.txt
(4)在vi中用:%s/^M//g
[root@dg ~]# cat t.txt | awk -F '' '{if($1!=null) print $0}'
203.208.46.146 www.google.com
223.208.46.146 www.google.com
203.208.46.147 www.google.com.hk
203.208.46.132 clients1.google.com
203.208.46.149 mail.google.com
[root@dg ~]# sed '/^$/d' t.txt
203.208.46.146 www.google.com
223.208.46.146 www.google.com
203.208.46.147 www.google.com.hk
203.208.46.132 clients1.google.com
203.208.46.149 mail.google.com
203.208.46.161 chatenabled.mail.google.com
[root@dg ~]# awk 'NF' t.txt
203.208.46.146 www.google.com
223.208.46.146 www.google.com
203.208.46.147 www.google.com.hk
203.208.46.132 clients1.google.com
203.208.46.149 mail.google.com
203.208.46.161 chatenabled.mail.google.com
223.208.46.146 www.google.com
203.208.46.147 www.google.com.hk
203.208.46.132 clients1.google.com
203.208.46.149 mail.google.com
203.208.46.161 chatenabled.mail.google.com