exact file search?

Page 2 of 2 Previous  1, 2

Go down

Re: exact file search?

Post by jeeva on Thu Mar 11, 2010 5:44 pm

the foll searches current n the sub directories

find -name doll.txt

jeeva

Posts : 50
Points : 93
Join date : 2010-03-04

View user profile

Back to top Go down

Re: exact file search?

Post by Christopher on Thu Mar 11, 2010 6:13 pm

jeeva wrote:find -name doll.txt

ya.. it works. Smile it searches sub-directories too.
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

using contents

Post by jeeva on Fri Mar 12, 2010 2:12 pm

is there any possibility that we can search for a file by specifying some content of that file!!!!

jeeva

Posts : 50
Points : 93
Join date : 2010-03-04

View user profile

Back to top Go down

Re: exact file search?

Post by Maithreyi on Fri Mar 12, 2010 2:18 pm

@ Jeeva, Is this what you are asking for ?

grep hello * will search for all files containing hello in the current directory.

Maithreyi

Posts : 76
Points : 142
Join date : 2010-03-03
Age : 30
Location : Haldia

View user profile

Back to top Go down

Re: exact file search?

Post by Christopher on Sat Mar 13, 2010 2:12 pm

In the following command, ' \ ' is called globbing character, this disables the implicit replacement of "NAME" by "*NAME*". I found it in a shell manual.

Code:
$ locate -b '\NAME'
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: exact file search?

Post by Christopher on Sun Mar 14, 2010 1:43 am

to know more about 'globbing' character, read this link.

http://en.wikipedia.org/wiki/Glob_%28programming%29
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: exact file search?

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum