Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 176407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:52:15+00:00 2026-05-11T13:52:15+00:00

I use following find command to find and show all files having the input

  • 0

I use following find command to find and show all files having the input text pattern.

find . -type f -print|xargs grep -n ‘pattern’

I have many project folders each of which has its own makefile named as ‘Makefile’.(no file extension, just ‘Makefile’)

How do i use above command to search for a certain pattern only in the files named Makefile which are present in all my project folders?

-AD.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:52:16+00:00Added an answer on May 11, 2026 at 1:52 pm

    -print is not required (at least by GNU find implementation). -name argument allows to specify filename pattern. Hence the command would be:

    find . -name Makefile | xargs grep pattern

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On ClearCase I use the following command to find all the elements that have
for example i use following command to find a record SELECT `users`.`mail` FROM `users`
I use the following command to find under /var some param in my script
Is there a way to use a command like git ls-files to show only
I am using the following command to find a pattern spanning multiple lines and
I can use the following command to search log files over the past 10
I can use the following command to find out if a Windows Terminal Server
I want to use find command to find some string in files, and want
I currently use the following command, but it's a little unwieldy to type. What's
I find that I have to use the following style to specify a style

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.