How do I use grep to find a file?



How do I use grep to find a file?..

Answer / Deepak Chaukar

To find a file using grep, you can search for a specific string within the file names. For example: 'grep -l <string> *' would return all files containing the specified string in their name. Note that this command should be run from your project root directory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

1 Answers  


use of ls command

9 Answers  


Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

1 Answers  


what are the different operating systems available?

3 Answers  


what is the use of wild cards?

2 Answers  


Why is it called grep?

1 Answers  


what is mount ,tell me about mount ,how can u use in real time project??

12 Answers   Symphony,


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1 Answers  


what is the use of the hidden files?

3 Answers  


What are some command words?

1 Answers  


How do I search for a file in unix command?

1 Answers  


How do you change file permissions and ownership in Unix?

2 Answers  


Categories