Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-08-2007, 09:44 AM   #1
LQ Newbie
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
Search for files only in directories you have sufficient permissions

I want to search for a file by its file name. The problem is that there are many directories in my file system which I cannot read due to insufficient permissions. Whenever such director is encountered during the search I get an annoying message.

How can I search for a file only in directories where I accurately can?
Old 04-08-2007, 10:07 AM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You can use the locate command, if your distribution runs updatedb. Otherwise, you can simply suppress the error messages from find by routing standard error to /dev/null:

find /somedir -name somename 2>/dev/null

If you have a recent desktop oriented system, it will have an indexing system based off of inotify (like beagle). You can then use the provided desktop search.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
user permissions to create files and directories ringding Linux - Security 3 09-07-2006 04:34 PM
Perl: Search and replace directories within text files Erhnam Programming 2 03-07-2006 04:07 AM
set file permissions for 100 directories & its files cevjr Linux - Security 6 01-06-2005 10:23 AM
permissions for group files/directories transferred from Netware mweil Linux - Newbie 1 07-01-2004 10:36 PM
How do I change permissions of files/directories? Okashira Linux - Newbie 5 01-12-2004 05:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration