[root@lys test]# find / -name "usr"
/usr
/usr/share/doc/oddjob-0.30/sample/usr
/usr/share/gdb/auto-load/usr
[root@lys test]# find / -name "usr" -a -name "sample"
[root@lys test]# find / -name "usr" -a -name "*sample*"
[root@lys test]#vim
[root@lys test]# ifconfig eth10
eth10: error fetching interface information: Device not found
[root@lys test]# ifconfig eth10 2> /dev/null
[root@lys test]# ifconfig eth10 | grep 'interface' 2> /dev/null
eth10: error fetching interface information: Device not found
[root@lys test]# centos
[root@lys yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
repo id repo name status
base CentOS-6 - Base 6,706
extras CentOS-6 - Extras 45
updates CentOS-6 - Updates 318
repolist: 7,069fetch
[root@lys yum.repos.d]# pwd
/etc/yum.repos.d
[root@lys yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo
[root@lys yum.repos.d]# grep 'enabled=1' CentOS*
[root@lys yum.repos.d]# grep 'enabled' CentOS*
CentOS-Base.repo:enabled=0
CentOS-Base.repo:enabled=0
CentOS-Debuginfo.repo:enabled=0
CentOS-Media.repo:enabled=0url
[root@lys yum.repos.d]# grep '\[base\]' -A6 CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6spa
[root@lys yum.repos.d]# vim CentOS-Base.repo
[root@lys yum.repos.d]#
[root@lys yum.repos.d]# grep '\[base\]' -A6 CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6orm
[root@lys yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@lys yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
extras | 3.4 kB 00:00
extras/primary_db | 29 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 864 kB 00:00
repo id repo name status
extras CentOS-6 - Extras 45
updates CentOS-6 - Updates 318
repolist: 363it