当我使用grep
或时find
,总是会被“权限被拒绝”和“没有这样的文件或目录”的通知所烦扰,如下所示:
johndoe@johndoe-desktop:/$ grep -rnP 'YII_CORE_PATH' ./ | grep -v .svn
grep: ./lib/ufw/user6.rules: Permission denied
grep: ./lib/ufw/user.rules: Permission denied
grep: ./lib/init/rw/udev/watch/27: No such file or directory
grep: ./lib/init/rw/udev/watch/26: No such file or directory
grep: ./lib/init/rw/udev/watch/25: No such file or directory
我如何才能避免使用它们并使其成为仅显示相关数据,即我真正想要的东西?
相关阅读:stackoverflow.com/a/25234419/54964
—
莱奥列奥波尔德·赫兹준 영