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
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 |
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 |
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 |
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 |
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 |
What will happen when a system call is encountered in a user program?
How can you check the amount of lines in a file?
some one is asking my machine is slow what is your steps?
What is free linux?
How do makefiles work?
In a company there are 3 groups i.e Finance, HR and Marketing. Each groups having 3 members. There is a file named as file1.txt. The permission set for the above file is rwx-rw----x. Now the question is only the members of Hr and Marketing group can view and edit the file. But the file is not accessible to the members of Finance Group. Can anyone tell me what would be the exact command for linux.root@localhost#<type the exact linux command>
What is the command to remove Lvm ,Pv and vg
12 Answers Tech Mahindra, TNS,
Explain trap command of linux?
What is makefile in unix?
If you have saved a file in linux. Later you wish to rename that file, what command is designed for it?
What is a simple command?
what is the roles and responsibilities in linux system admin having 2yrs exp..?
0 Answers HCL, RNF Technologies,