【发布时间】:2009-05-21 23:14:50
【问题描述】:
我的last question扩大了,所以我们分开分析。
AND 运算符,交叉口?
我举个例子:
$ find . | awk -F"/" '{ print $2 }'
.zcompdump
.zshrc
.zshrc_copy
.zshrc_somequy
.bashrc
.emacs
$ find ~/bin/FilesDvorak/.* -maxdepth 0 | awk -F"/" '{ print $6 }'
.bashrc
.emacs
.gdbinit
.git
.profile
当我将输出保存到单独的列表时,我无法理解为什么该命令不采用常见的东西:
find -f all_files -and -f right_files .
我只想要:
.bashrc
.emacs
【问题讨论】:
-
至少对于 Linux 和 Solaris 和 CygWin,find 没有“-f”测试。也许在 OSX 上有。如果没有,这可能是您的问题的一部分。