unix find command Permission issues in result
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
.
精彩评论