当前位置: 技术问答>linux和unix
为什么 find 在 home 目录查找其他目录会失败呢?
来源: 互联网 发布时间:2017-03-27
本文导语: Administrator@web016 ~ $ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log (在home目录,一个都找不到) Administrator@web016 ~ $ cd / Administrator@web016 / $ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log /cygdrive/d/svn/r...
Administrator@web016 ~
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log
(在home目录,一个都找不到)
Administrator@web016 ~
$ cd /
Administrator@web016 /
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log
/cygdrive/d/svn/release/log/Auct/Debug_20121129_000000.log
/cygdrive/d/svn/release/log/Auct/Debug_20121130_000000.log
(去到其他目录,就找到了)
我写错什么了吗?
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log
(在home目录,一个都找不到)
Administrator@web016 ~
$ cd /
Administrator@web016 /
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name *.log
/cygdrive/d/svn/release/log/Auct/Debug_20121129_000000.log
/cygdrive/d/svn/release/log/Auct/Debug_20121130_000000.log
(去到其他目录,就找到了)
我写错什么了吗?
|
name 后面的值加上双引号试试
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name "*.log"
$ find /cygdrive/d/svn/release/log -mtime +10 -type f -name "*.log"