系统版本:ubuntu-8.10-server
grep -r test path查找目录path下文件内容含有test(字符串)的文件。
greb命令帮助:
例如
grep -r LOWER_UP /usr/src/linux
输出:
/usr/src/linux/net/core/dev.c: IFF_LOWER_UP |
/usr/src/linux/net/core/dev.c: flags |= IFF_LOWER_UP;
/usr/src/linux/include/linux/if.h:#define IFF_LOWER_UP 0x10000 /* drive
r signals L1 up */
/usr/src/linux/include/linux/if.h: IFF_MASTER|IFF_SLAVE|IFF_RUNNING
|IFF_LOWER_UP|IFF_DORMANT)
/usr/src/linux/Documentation/networking/can.txt: 2: can0:
ECHO> mtu 16 qdisc pfifo_fast state UP qlen 10
/usr/src/linux/Documentation/networking/operstates.txt:ifinfomsg::if_flags & IFF
_LOWER_UP:
/usr/src/linux/Documentation/networking/operstates.txt:Kernel drivers have acces
s to two flags that map to IFF_LOWER_UP and
/usr/src/linux/Documentation/networking/operstates.txt:__LINK_STATE_NOCARRIER, m
aps to !IFF_LOWER_UP:
/usr/src/linux/Documentation/networking/operstates.txt:-if initial flags are not
(IFF_LOWER_UP && !IFF_DORMANT), wait until
/usr/src/linux/Documentation/networking/operstates.txt:-restart if kernel change
s IFF_LOWER_UP or IFF_DORMANT flag
笔者的此命令把 path 设为“/”时,出现提示
grep: /var/run/dovecot/auth-worker.5224: No such device or address
grep: /var/run/dovecot/dict-server: No such device or address
grep: /var/run/dovecot/login/default: No such device or address
grep: /var/run/samba/winbindd_privileged/pipe: No such device or address
grep: /var/run/libvirt/libvirt-sock-ro: No such device or address
grep: /var/run/libvirt/libvirt-sock: No such device or address
grep: /var/run/cups/cups.sock: No such device or address
grep: /var/run/postgresql/.s.PGSQL.5432: No such device or address
grep: /var/run/mysqld/mysqld.sock: No such device or address
grep: /var/run/dbus/system_bus_socket: No such device or address
求好心的高手指导为何如此,能否解决,如何解决!
阅读(1926) | 评论(0) | 转发(0) |