Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5970

How to use only grep to find files with specific filename? [closed]

$
0
0
  1. I'm using GNU bash (v 5.1.16), grep (GNU grep) 3.7, Ubuntu 22.
  2. No piping or any other tool allowed
  3. I don't want to search the file's contents but only need to find files with matching filename.

I know that it is easy to do with "find" command or multiple grep command like

"grep -rl "" . | grep "<filename>"

But i want to do it in single command without any other tools help. Also tried this question but couldn't find answer that satisfies the mentioned conditions.Thanks.


Viewing all articles
Browse latest Browse all 5970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>