shell获取mac地址及获取硬盘序列号的方法
2012-03-21 10:02
232 查看
#读取服务器的MAC地址
MAC=$(ifconfig eth0|grep eth0|awk '{print $5}')
#读取服务器的硬件序列号
hdparm -I /dev/sda > /hdSerial.txt
hdSer=$(grep \\"Serial Number" hdSerial.txt)
SER=$(echo ${hdSer#*:})
MAC=$(ifconfig eth0|grep eth0|awk '{print $5}')
#读取服务器的硬件序列号
hdparm -I /dev/sda > /hdSerial.txt
hdSer=$(grep \\"Serial Number" hdSerial.txt)
SER=$(echo ${hdSer#*:})
相关文章推荐
- C#获取cpu序列号,硬盘ID,网卡MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- 获取CPU序列号,硬盘ID,网卡MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- 获取Mac、CPUID、硬盘序列号、本地IP地址、外网IP地址OCX控件
- 用C#获取硬盘序列号,CPU序列号,网卡MAC地址
- 获取主板序列号 cpu序列号,硬盘序列号,MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- 用C#获取硬盘序列号,CPU序列号,网卡MAC地址
- Linux下获取CPUID、硬盘序列号与MAC地址
- C#获取cpu序列号,硬盘ID,网卡MAC地址
- c#中获取cpu序列号,硬盘id,网卡mac地址
- C#获取cpu序列号,硬盘ID,网卡MAC地址
- 用C#获取硬盘序列号,CPU序列号,网卡MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- 获取cpu序列号,硬盘ID,网卡MAC地址
- C#应用:获取cpu序列号,硬盘ID,网卡MAC地址
- 用C#获取硬盘序列号,CPU序列号,网卡MAC地址
- C#获取cpu序列号,硬盘ID,网卡MAC地址