Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


if i have one folder say aaa and that folder having 100
files from that 50 files there aaa word is written how to
find in which aaa is writen and without opening that file

Answers were Sorted based on User's Feedback



if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / pankaj kumar

grep -r aaa aaa

Is This Answer Correct ?    4 Yes 1 No

if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / vaithy

grep -r aaa -e aaa

where,
-r recursive (includes all files, Folders and subfolders)
-e pattern (to be searched)

Is This Answer Correct ?    2 Yes 0 No

if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / nixor

grep -rl aaa ./aaa/*

That would list the file name where the string aaa is
present. (-l switch)

Is This Answer Correct ?    0 Yes 0 No

if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / m.krishna kumar

#cd aaa
#cat <file name> | grep aaa

this is work only if you know the file name otherwise it is
not use . other way is if you must count the file then find
the file name of the 50 file then use the above command.

Is This Answer Correct ?    1 Yes 1 No

if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / brian

Find ./aaa -type f -exec grep -l aaa {} \;

This will list the paths and file names containing the text aaa in any file in the directory named aaa.

Is This Answer Correct ?    0 Yes 0 No

if i have one folder say aaa and that folder having 100 files from that 50 files there aaa word is..

Answer / rallapalli

#cd /aaa | ls -l | grep aaa


see which file time and date through that u can know


Thanks

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Linux Commands Interview Questions

How do I find the linux version?

0 Answers  


How many types of commands are there in linux?

0 Answers  


What is difference between egrep and grep?

0 Answers  


What is make in linux?

0 Answers  


How will you execute a java program inside a kornshell script?

1 Answers   HP,


What is cpu in top command?

0 Answers  


How do I find old commands in linux?

0 Answers  


Explain how you would manage background and foreground processes in Linux.

1 Answers  


In my linux machine, i lost /etc/passwd file and /etc/shadow file, then how can i recover it?

5 Answers   Google,


What is sudo bash command?

0 Answers  


How do I find hostname in linux?

0 Answers  


Which command is used to terminate a process?

0 Answers  


Categories