DISQUS

DISQUS Hello! Tech-Recipes is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Tech-Recipes

Cookbook of Tech Tutorials
Jump to original thread »
Author

Find a file by name in UNIX/Solaris/Linux | UNIX | Tech-Recipes

Started by qdideas · 9 months ago

No excerpt available. Jump to website »

4 comments

  • so, i get a bunch of "Permission Denied" notices for directories that my current user account can't access. is there a way to suppress these?
  • Yeah, totally. Normal output goes to "standard output" which can be redirected with normal measures. It's actually a nice thing that those messages are sent to "standard error" so you can redirect those but keep the more interesting responses.

    find / -name something 2> /dev/null
  • try this # find <folder path> -name <filename> -print
  • His problem is is that he doesn't have permissions to view a lot of the files 'find' uses. Here's a few options:
    If you don't have root permission, then you can supress error messages like so: 'find -ignore_readdir_race /parent/path/here -name file_name.txt'
    Or if you can get permission, then: 'sudo find /parent/path/here -name file_name.txt'

    yay!

Add New Comment

Returning? Login