how to find a content in all files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to find a content in all files
# 1  
Old 04-15-2010
how to find a content in all files

Hi,

i would like to find 'AppManage' in all files. i have tried the following but it didn't work.

/local/home/mani>grep -iR 'AppManage' *.* - not outcome
/local/home/mani>grep -iR 'AppManage' - this one hangs

thanks
# 2  
Old 04-15-2010
Quote:
Originally Posted by lookinginfo
Hi,

i would like to find 'AppManage' in all files. i have tried the following but it didn't work.

/local/home/mani>grep -iR 'AppManage' *.* - not outcome
/local/home/mani>grep -iR 'AppManage' - this one hangs

thanks
Code:
/local/home/mani>grep -iR 'AppManage' *

# 3  
Old 04-15-2010
Quote:
Originally Posted by lookinginfo
Hi,

i would like to find 'AppManage' in all files. i have tried the following but it didn't work.

/local/home/mani>grep -iR 'AppManage' *.* - not outcome
/local/home/mani>grep -iR 'AppManage' - this one hangs

thanks
this will check all arguuments inside all text files ( you can give another file extension too).

Code:
find . -type f -name "*txt" -print | xargs grep -i appmanage

# 4  
Old 04-16-2010
Quote:
Originally Posted by lookinginfo
/local/home/mani>grep -iR 'AppManage' - this one hangs
No, this requires input from stdin.

Code:
grep -iR 'AppManage' -
AppManage
AppManage

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies

2. UNIX for Dummies Questions & Answers

Find all files containing string not following symlinks CAT (modified) output content to /filename

This should recursively walk through all dirictories and search for a specified string in all present files, if found output manicured content (eg some regex) with CAT into a specified directory (eg /tmp/) one by one, keeping the original names This is what I have so far, which seems to... (1 Reply)
Discussion started by: lowmaster
1 Replies

3. Shell Programming and Scripting

Find difference in content between two particular lines in two files

I have two files named Before.txt and After.txt: Now i want to find the difference in content between <Marker 1> and <Marker 2> in the two files. ---------- Post updated at 05:00 PM ---------- Previous update was at 04:50 PM ---------- Any help will be highly appreciated..:) (3 Replies)
Discussion started by: proactiveaditya
3 Replies

4. Shell Programming and Scripting

search for content in files. Name of files is in another file. Format as report.

Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Discussion started by: pkabali
6 Replies

5. Shell Programming and Scripting

Find out the match data content?!

Hi, Long list of Input file1 content: 1285_t 4860_i 4817_v 8288_c 9626_a . . . Long list of Input file2 content: 1285_t chris germany 8288_c steve england 9626_a dave swiss 9260_s stephanie denmark . . . (14 Replies)
Discussion started by: patrick87
14 Replies

6. Shell Programming and Scripting

how to find out overlaped content

i have two single column text files a and b. in this two files, there are some overlap content, is there any quick way I can find out those overlapped content? example, file a 1 2 3 4 5 6 file b 2 35 7 8 4 2 and 4 are overlapped in these two files so they should be picked up. (3 Replies)
Discussion started by: fedora
3 Replies

7. Shell Programming and Scripting

find and replace in subdirectory (filename & content - both)

Hi, I have to rename all occurance of CUST_MST to RESELLER_MST both in filename and file content under a directory (say D0) which contains multiple (2-3 levels) sub directory. Example: D0 -> D1 -> D2 has a file CUST_MST_TEMP.txt this contains : > cat /D0/D1/D2/CUST_MST_TEMP.txt... (3 Replies)
Discussion started by: sabyasm
3 Replies

8. Shell Programming and Scripting

find content from a file

root 0 0 5 0 11/09/07 08:18 root 0 0 6 0 11/09/07 08:56 root 0 0 7 0 11/22/07 11:09 user1 0 0 8 0 11/08/07 15:58 user2 0 0 9 0 11/30/07 08:37 ... (7 Replies)
Discussion started by: ust
7 Replies

9. UNIX for Dummies Questions & Answers

find the same content in the file

I have two files ( eg. file1 and file2 ) , its contents are as below , I want to find out the same content ( same word ) in the two files , in the below example , the same content is "aaa" , could suggest how to do it ? thx. #vi file1 aaa bbb ccc ddd #vi file2 111 222 333 aaa (4 Replies)
Discussion started by: ust
4 Replies

10. UNIX for Dummies Questions & Answers

find filename based on file content

:confused: There is a flat file on my system which contains email addreses of people in my company. This file is utilized when sending notifications for various things. However nobody knows where this file is located or what it is named. The only thing we know is the email address of a user who... (4 Replies)
Discussion started by: kollerj
4 Replies
Login or Register to Ask a Question