lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:31 errors:0 dropped:0 overruns:0 frame:0 TX packets:31 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2130 (2.0 KiB) TX bytes:2130 (2.0 KiB)6.which --搜索命令(用于查找相关命令的位置)
[gongxijun@tomato2 root]$ which cat /bin/cat如果想要验证:[gongxijun@tomato2 root]$ dir /bin/
alsaunmute dnsdomainname lsblk rviewarch domainname lscgroup sedawk dumpkeys lssubsys setfontbasename echo mail setserialbash ed mailx shcat egrep mkdir sleepcgclassify env mknod sortcgcreate ex mktemp sttycgdelete false more sucgexec fgrep mount synccgget find mountpoint tarcgset findmnt mv tasksetcgsnapshot gawk nano tcshchgrp gettext netstat touchchmod grep nice tracepathchown gtar nisdomainname tracepath6cp gunzip ping traceroutecpio gzip ping6 traceroute6csh hostname plymouth truecut ipcalc ps umountdash iptables-xml pwd unamedate iptables-xml-1.4.7 raw unicode_startdbus-cleanup-sockets kbd_mode readlink unicode_stopdbus-daemon keyctl red unlinkdbus-monitor kill redhat_lsb_init usleepdbus-send link rm vidbus-uuidgen ln rmdir viewdd loadkeys rnano ypdomainnamedf login rpm zcatdmesg ls rvi7.locate ---文件搜索命令
查找一个 iptables的文件 ,然后就可以搜索出这么多文件。
[gongxijun@tomato2 root]$ locate iptables/bin/iptables-xml/bin/iptables-xml-1.4.7/etc/alternatives/bin-iptables-xml.x86_64/etc/alternatives/iptables.x86_64/etc/alternatives/man-iptables-restore.x86_64/etc/alternatives/man-iptables-save.x86_64/etc/alternatives/man-iptables-xml.x86_64/etc/alternatives/man-iptables.x86_64/etc/alternatives/sbin-iptables-multi.x86_64/etc/alternatives/sbin-iptables-restore.x86_64/etc/alternatives/sbin-iptables-save.x86_64/etc/rc.d/init.d/iptables在使用locate查找文件是,也可以使用星号表示所有字符,点号表示所有单字符。举列子: 要查找所有以字母ca开头的文档
[gongxijun@tomato2 root]$ locate *a
/var/lib/yum/yumdb/z/b8019061884a679c3b9b867b44c7b9c64182240d-zip-3.0-1.el6-
x86_64/checksum_data/var/log/sa/var/log/samba[gongxijun@tomato2 8. 手动更新数据库 --- updatedb9. whereis ----特殊文件搜索命令[gongxijun@tomato2 root]$ whereis catcat: /bin/cat /usr/share/man/man1/cat.1.gz /usr/share/man/man1p/cat.1p.gz10. apropos --- 关键字搜索命令 [gongxijun@tomato2 root]$ apropos process