Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

exact file search?

+2
Christopher
Naveen
6 posters

Page 2 of 2 Previous  1, 2

Go down

exact file search? - Page 2 Empty Re: exact file search?

Post by jeeva 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

Back to top Go down

exact file search? - Page 2 Empty Re: exact file search?

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

jeeva wrote:find -name doll.txt

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

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

https://unixcpp.forumotion.com

Back to top Go down

exact file search? - Page 2 Empty using contents

Post by jeeva 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

Back to top Go down

exact file search? - Page 2 Empty Re: exact file search?

Post by Maithreyi 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 : 36
Location : Haldia

Back to top Go down

exact file search? - Page 2 Empty Re: exact file search?

Post by Christopher 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'
Christopher
Christopher
Admin

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

https://unixcpp.forumotion.com

Back to top Go down

exact file search? - Page 2 Empty Re: exact file search?

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

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

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

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

https://unixcpp.forumotion.com

Back to top Go down

exact file search? - Page 2 Empty 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