һ���鿴cpu
more /proc/cpuinfo | grep "model name"
grep "model name" /proc/cpuinfo
���������ҫ���ĸ������
grep "model name" /proc/cpuinfo | cut -f2 -d:
�����鿴�ڴ�
grep memtotal /proc/meminfo
grep memtotal /proc/meminfo | cut -f2 -d:
free -m |grep "mem" | awk '{print $2}'
�����鿴cpu��32λ����64λ
�鿴cpuλ��(32 or 64)
getconf long_bit
�ģ��鿴��ǰlinux�i汾
more /etc/redhat-release
cat /etc/redhat-release
�壺�鿴�ں˰汾
uname -r
uname -a
�����鿴��ǰʱ��
date
�����ѿ��������ͬ��ʱ���ˣ�
�ߣ��鿴ӳ�̺ͷ���
df -h
fdisk -l
ҳ���բ鿴����
du -sh
���կ���ȫ��ռ�õŀռ�
du /etc -sh
���կ������ŀ¼�ĵ�с
�ˣ��鿴��װ�������
�鿴ϵͳ��װ��ʱ��װ�������
cat -n /root/install.log
more /root/install.log | wc -l
�鿴�����ѿ���װ����щ�����
rpm -qa
rpm -qa | wc -l
yum list installed | wc -l
��������֣���ͨ��rpm����yum�����ַ�ʽ��ѯ�i�װ���������������һ����û���ҵ�ԭ��
�ţ��鿴���̲���
cat /etc/sysconfig/keyboard
cat /etc/sysconfig/keyboard | grep keytable | cut -f2 -d=
ʮ���鿴selinux���
sestatus
sestatus | cut -f2 -d:
cat /etc/sysconfig/selinux
ʮһ���鿴��mac��ַ
��ifcfg-eth0 �ļ�������կ���mac�����ص���ϣ��
ifconfig
cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep addr
cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep ipaddr | cut -f2 -d=
ifconfig eth0 |grep "inet addr:" |awk '{print $2}'|cut -c 6-
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
�鿴����
cat /etc/sysconfig/network
�鿴dns
cat /etc/resolv.conf
ʮ�����鿴ĭ������
echo $lang $language
cat /etc/sysconfig/i18n
ʮ�����鿴����ʱ�����ƿ�ʹ��utcʱ��
cat /etc/sysconfig/clock
ʮ�ģ��鿴������
hostname
cat /etc/sysconfig/network
������������������ļ���ͬʱ�ϻ�ҳ��host�ļ�ҳ�ġ�
#�鿴��������ʱ��
uptime
09:44:45 up 67 days, 23:32, ...
:-) �������ղ�ȷʵ�����ε����⣬�ҵļ�������67��ǰ�����ġ�
#ϵͳ��դʹ�����
vmstat 1 -s m
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 233 199 778 0 0 4 25 1 1 3 0 96 0 0
0 0 0 233 199 778 0 0 0 0 1029 856 13 1 86 0 0
�������ר�ŷ�һƭ������������
����ʹ��svn����ϵͳǩ�ƣ�������ֽϳ���·��д���ˣ�����������դ���������鿴 .svn/entries �����˽���һ����������ݡ�����ǩ��ʱ��̫���ˣ�����ֱ�ӱ��ļ��滻���
for f in $(find ./ -type f -name 'entries')
do
sed -i "s/202\.68\.134\.18/202\.68\.134\.34/g" $f
done
sed ��˵��:
sed "s/sourcestring/newstring/g" $f
�� $f �ļ��е� sourcestring ���� newstring��������նˡ�s ��ʾ�����滻��/g��ʾȫ�֡�
sed -i $f
��ʾֱ���� $f ���ġ�
sed -iback $f
��ʾ�ĺ���ļ����ϊ $fback
sed ������������ʽ������ʹ���ϸ��ת��� \ ����
sed ������ƚ��ϸ� " \ / ! ����ҫ�ֱ��� \" \/ \\ \! ת�塣
\n ��ʾ����