Linux Find removal error message

Source: Internet
Author: User

When Linux is looking, access to some directories may not be accessible and many error messages are printed

1. root directory file contents

-bash-3.2$ ls
Anaconda-ks.cfg Bea Desktop Lib Wls1036_generic.jar

2. Find the file ending with. Log,

-bash-3.2$ find. -name "*.log"
Find:/.gconfd:? ƒé™?? ? ¤ÿ
Find:/.gnome2:? ƒé™?? ? ¤ÿ
Find:/.gnome2_private:? ƒé™?? ? ¤ÿ
Find:./. Trash: ƒé™?? ? ¤ÿ
Find:/.java:? ƒé™?? ? ¤ÿ
Find:/.tuscany:? ƒé™?? ? ¤ÿ
Find:/.eggcups:? ƒé™?? ? ¤ÿ
Find:/.chewing:? ƒé™?? ? ¤ÿ
Find:/.mozilla/firefox:? ƒé™?? ? ¤ÿ
Find:/.scim:? ƒé™?? ? ¤ÿ
Find:/.metacity:? ƒé™?? ? ¤ÿ
Find:/.gconf:? ƒé™?? ? ¤ÿ
Find:/.nautilus/metafiles:? ƒé™?? ? ¤ÿ

At this time the system language use Chinese instead of a problem, very strange
-bash-3.2$ Echo $LANG
Zh_cn. UTF-8

Temporary change to English

-bash-3.2$ export lang= "en_US. UTF-8 "
-bash-3.2$ Echo $LANG
en_US. UTF-8

And then find
-bash-3.2$ find. -name "*.log"
Find:./.gconfd:permission denied
Find:./.gnome2:permission denied
Find:./.gnome2_private:permission denied
Find:./. Trash:permission denied
Find:./.java:permission denied
Find:./.tuscany:permission denied
Find:./.eggcups:permission denied
Find:./.chewing:permission denied
Find:./.mozilla/firefox:permission denied
Find:./.scim:permission denied
Find:./.metacity:permission denied
Find:./.gconf:permission denied
Find:./.nautilus/metafiles:permission denied

3, the error output to the/dev/null device, the error message disappears
-bash-3.2$ find. -name "*.log" 2>/dev/null
-bash-3.2$ find. -name "*.cfg" 2>/dev/null
./anaconda-ks.cfg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.