我last question扩大,让我们单独分析的东西。AND运算符如何在FIND命令中工作?
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上。如果没有,这可能是你的问题的一部分。 – Eddie 2009-05-21 23:42:48