Linux, confused about 'find' command

I want to find all occurences of thestring '7' withing all the files of my current directory

How can I do this using the command 'find'

How do I do this by finding all occurences of '7' in the current directory and its subdiirectories ?

Thanks
Los Angeles1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
woolmilkporcConnect With a Mentor Commented:
Do you mean within the content of the files or within the file names?

Names:

find . -type f -name "*7*"

Content:

find . -type f |xargs grep  "7"

Use

find . -type f |xargs grep  -l "7"

to see just the names of the files witch matching content, not the content itself.
0
 
ITTallahasseeCommented:
find -name '*7*'

Open in new window


That will search the current directory and its subdirectories.

http://linux.die.net/man/1/find
0
All Courses

From novice to tech pro — start learning today.