LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-30-2012, 01:57 AM   #1
abi
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Rep: Reputation: Disabled
how to search a perticular file in fedora ???


1)how to search a particular pdf or folder path in fedora??

2)if there is a file named project_latest ,but while searching i am not able to remember its name completely(eg i know the file starts with filename project) then is there any way that i can find its path???
 
Old 01-30-2012, 02:08 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Have a look at the man page for find:
Code:
man find
Another option is to use locate, if you run updatedb on a regular basis:
Code:
man locate
man updatedb
Since this is basic knowledge, might I suggest you read some basic documentation such as this one?

Kind regards,

Eric
 
1 members found this post helpful.
Old 01-30-2012, 02:25 AM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
if there is a file named project_latest
You can search this file like this:

Like in / directory:
Quote:
# find / -name project_latest
OR

Quote:
# locate project_latest
For using other switches, see the man page of find and locate as suggested by EricTRA

Last edited by Satyaveer Arya; 01-30-2012 at 02:26 AM.
 
Old 01-30-2012, 04:09 PM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,053

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by abi View Post
2)if there is a file named project_latest ,but while searching i am not able to remember its name completely(eg i know the file starts with filename project) then is there any way that i can find its path???
If you mean that literally all that you remember about the filename is that it contains project and nothing else then

Code:
locate project
will do that, but may well give a large number of hits (err, actually will give a large number of hits) if you have a large number of filenames that contain the string 'project', which is quite possible.

If, on the other hand, you can remember some stuff about the pathname, just not quite the exact filename, then there are still things that you can do. So, imagine that you can remember that it is in a home directory, you could try

Code:
locate project | grep -i home
Which may reduce the number of results, somewhat. (And, now for my favourite, rather minimalistsic, comment: ) Etc.
 
1 members found this post helpful.
Old 02-01-2012, 03:29 AM   #5
abi
LQ Newbie
 
Registered: Jan 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
thank you all,i have recieved positive answers which helped to find the sol to the thread.
 
Old 02-01-2012, 03:59 AM   #6
jainjohny
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
Hi Abi,

The simpler way to find a file is " find (directory) | grep (file name), if you are not aware where is file location use command as find / | grep (file name).

Thanks & Regards,
Jain.T.J
 
Old 02-02-2012, 02:23 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by abi View Post
thank you all,i have recieved positive answers which helped to find the sol to the thread.
Hi,

If you've found a solution and consider your problem solved, then please mark the thread as such. Also in the spirit of the community, post what you considered a solution so that others in a similar situation might see if it applies to their question/problem too.

Kind regards,

Eric
 
  


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
Finding Perticular Character in a file dina3e Programming 6 07-11-2008 11:07 PM
log of a perticular folder mujahed_khan Linux - Newbie 4 02-10-2008 04:03 PM
How to know on termination or exit of a perticular process in Unix Pavan mahoorker Linux - Software 1 06-07-2005 07:28 AM
run a perticular script before loggin in rohan208 Linux - General 1 05-07-2004 11:37 AM
How to 'apt-cache search' & 'apt-file search' by distribution? davidas Debian 3 04-19-2004 02:56 PM


All times are GMT -5. The time now is 10:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration