LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-20-2008, 09:39 AM   #1
mconstant
LQ Newbie
 
Registered: May 2005
Location: Boulder, CO
Distribution: Fedora
Posts: 12

Rep: Reputation: 0
Searching for JDK using find


Hi. I'm having trouble getting the find command to return useful results while searching for JDK. I'm typing

find / -name "jdk*." -print

any suggestions?
 
Old 11-20-2008, 09:49 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,218

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
Quote:
Originally Posted by mconstant View Post
Hi. I'm having trouble getting the find command to return useful results while searching for JDK. I'm typing

find / -name "jdk*." -print

any suggestions?
Try leaving off the . in your search string.
 
Old 11-20-2008, 10:01 AM   #3
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Rep: Reputation: 19
I usually use something liek:

Code:
find / |grep -i jdk
 
Old 11-20-2008, 10:06 AM   #4
mconstant
LQ Newbie
 
Registered: May 2005
Location: Boulder, CO
Distribution: Fedora
Posts: 12

Original Poster
Rep: Reputation: 0
Also, I want to get rid of all the permission denied error messages that popup. Couldn't find a flag to supress errors in the find man page. Suggestions?
 
Old 11-20-2008, 10:07 AM   #5
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Or simply
Code:
locate jdk
 
Old 11-20-2008, 10:08 AM   #6
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Quote:
Originally Posted by mconstant View Post
Also, I want to get rid of all the permission denied error messages that popup. Couldn't find a flag to supress errors in the find man page. Suggestions?
Either use the find command as root (if you can acquire root privileges) or redirect standard error to /dev/null
Code:
find blah blah blah 2> /dev/null
 
  


Reply


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
searching within files. cat grep find w3bd3vil Linux - Newbie 4 10-13-2008 03:59 AM
Jdk onelung02 Linux - Software 5 07-14-2006 03:43 PM
LXer: CLI Magic: Searching with find LXer Syndicated Linux News 0 07-10-2006 05:33 PM
bash searching directries and find the files bekirsagir Programming 1 08-19-2005 04:37 AM
where can i find a proxy searching & testing for speed tygk Mandriva 3 11-25-2004 02:24 AM


All times are GMT -5. The time now is 11:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration