LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-08-2007, 09:44 AM   #1
tepez
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
macemoneta
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: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:31 PM.

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