开发者

unix find command Permission issues in result

开发者 https://www.devze.com 2023-03-04 19:12 出处:网络
In Unix, when i execute $ find . -name \'Export.class\' -print Displays, The file access permissions do not allow the specified action.

In Unix,

when i execute

$ find . -name 'Export.class' -print

Displays,

The file access permissions do not allow the specified action.
find: 0652-081 开发者_如何学Gocannot change directory to </usr/.ibm>:

the errors should not be displayed in console. Only the result is required.


Are you asking how to "turn off" the errors? Because if so it's done like this:

$ find . -name 'Export.class' -print 2>/dev/null

This redirects stderr to /dev/null so you won't see it, leaving you with just the results.


$ find . -name 'Export.class' -print 2>/dev/null

2> redirecting the standard error into /dev/null.

0

精彩评论

暂无评论...
验证码 换一张
取 消