General :: Find Words 'struct' And 'messages_sdd_t' In Many Files

Apr 23, 2010

I am looking for this struct messages_sdd_t and I need to search through a lot of *.c files to find it. However, I can't seen to find a match as I want to exclude all the words 'struct' and 'messages_sdd_t'. As I want to search on this only 'struct messages_sdd_t' The reason for this is, as struct is used many times and I keep getting pages or search results. I have been doing this without success:

find . -type f -name '*.c' | xargs grep 'struct messages_sdd_t'

and this

find . -type f -name '*.c' | xargs egrep -w 'struct|messages_sdd_t'

View 2 Replies


ADVERTISEMENT

General :: Use Grep To Find The Words In The Dictionary?

Dec 1, 2010

I'm trying to use grep to find the words in the dictionary that contain the letters "th" and the letter m.

I tried grep 'th m*.' Desktop/Dictionary/words(Thats where the destined dictionary word document is located)

grep 'th' Desktop/Dictionary/words works but only for the words with th. I have no idea of what expression to use to make it a unionized expression with m

View 3 Replies View Related

General :: Regex To Find Min / Max Length Words In File?

Jan 29, 2011

i am trying to find all 3 and 4-character length words in my file (which is huge and has alot of entries in it, a big fat wordlist!).My attempt with this regular expression (which I thought should work, found something on length search here: [URL]

cat sorted_noapostrophe.txt| grep '.{3,4}'

but it returns no results? Also to find any words starting with 'f' which are between 3 and 5 characters (inclusive) long, how can this be done?

View 4 Replies View Related

General :: Finding Words In Files?

Apr 23, 2010

I am looking for this `struct messages_sdd_t` and I need to search through a lot of *.c files to find it.However, I can't seen to find a match as I want to exclude all the words 'struct' and 'messages_sdd_t'. As I want to search on this only 'struct messages_sdd_t' The reason for this is, as struct is used many times and I keep getting pages or search results.The directory I am searching in, has another directories so it will have to search recursively.I have been doing this without success:Code: find . -type f -name '*.c' | xargs grep 'struct messages_sdd_t'and thisCode: find . -type f -name '*.c' | xargs egrep -w 'struct|messages_sdd_t'

View 3 Replies View Related

General :: Show Only Unique Words Between Two Files?

Feb 23, 2011

Quote:File1:
Hi, My name is John smith
Quote:
File2:
Hi, My name is smith

I want to show only the different or unique word between the two files (John)i was trying to get it with diff, comm, sort, uniq, grep, awk, sed

View 5 Replies View Related

General :: Searching Files For Specific Words Or Phrases

Jan 31, 2011

I have word like initialize_my_var:in sample.php and I included three library files, take it as a.php, b.php, c.php ,I really don't know where my label(initialize_my_var:)definition is present in my library files, is it possible with a pattern matching string to find which library file really have the exact term "initialize_my_var:" , I'm really looking for an exact pattern match.

View 1 Replies View Related

Programming :: Kernel Module - Task_struct / Files Struct, Open_fds, And The Open File Descriptors In Task?

May 1, 2010

This for Kernel 2.6.29.6. I'm trying to code a kernel module that displays process information.

how to count opened file descriptors per task. I have been able to write a module that lists all the current process names along with their pid number in /var/log/messages. Basically, I cycle through the ring of processes using the macro for_each_process(task) and printk the comm and pid of each task. I'm trying to see how many file descriptors each task has open. I've been reading up in books and all over the internet. At first I thought I needed to access max_fds under files_struct, but that just lists the maximum number of file descriptors that can be opened per task, which by default is set at 256. I then thought about counting the elements in the fd_array. But then I learned that every task's fd_array is initially set at 32. Now I know that I need to access open_fds of type fd_set * in files_struct. open_fds is a pointer to all the open file descriptors. The problem is that I don't know how to access a pointer of type fd_set.

Is there a good guide or book that really focuses on type fd_set and open_fds? Every book and resource I've read never really go into depth on this. relationship between files struct, open_fds, and the open file descriptors in task?

View 4 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

General :: Command Line - Use Find To Find Text Files?

Jul 15, 2011

Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.

View 2 Replies View Related

General :: Find Setuid Files Using FIND Command?

Jan 25, 2009

I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"

View 1 Replies View Related

General :: List/find All Regular Files In All Subdirectories Excluding Binary Files

Oct 5, 2010

I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find

View 4 Replies View Related

General :: GREP On Words With 2 Or More Z's?

Dec 21, 2010

I need to grep a dictionary file.Only the words that contain 2 or more z's and only 1 b needs to be listed.

View 1 Replies View Related

General :: Add Quotes Between Words In A Cvs File?

Mar 8, 2010

I exported a spreadsheet file into cvs format.

The cvs file is formatted this way

field1,field2,field3,..etc

I want it to be in a Quote delimited format like so

"field1","field2","field3",..etc

View 2 Replies View Related

General :: Count Lines And Words?

Feb 15, 2010

How can I display the no. of lines, words and characters for each file in current directory and in sub directory.

wc . * shows errornous result as there are some executable files in that directory.

View 2 Replies View Related

General :: Vim Replace All The Same Words In A Certain Line?

Dec 2, 2010

15 for(i = 0; i < N; i++) I want to replace "i" with "test" in the line above,whose line number is 15. When I tried this command :15s/i/test/ Line 15 turned to be this: for(test = 0; i < N; i++) It only replace the first "i",but I want to change all "i" in line 15.

View 3 Replies View Related

General :: Grep 2 Words At The Same Time?

Sep 9, 2010

I want to grep any line with "john" or "jack". How to do that? I tried

grep john | grep jack
but it didn't work

View 2 Replies View Related

General :: Searching Words With Space?

May 26, 2011

I want to search lines with these stings with one or more spaces..

e.g

Code:
a b
a b
a b
a b

How will I achieve this by egrep ?

View 14 Replies View Related

General :: Count Words With Comma As Separator?

Feb 16, 2010

I'm trying to count words in a text file that has a comma as separator. I know that I must user wc -w, but wc uses space as a separator

View 2 Replies View Related

General :: Sed Regex To Match Words Via A Pattern

Oct 24, 2010

I have some lines of text and I want to detect words that meet some criteria with sed.

E.g. The line "tetris cat dog test cactus stereotype"

I want to detect the word that contains two (2) ore more t letters. That mean the words tetris, test and stereotype.

The following regex doesn't do the job because it can;t distinguish words very well.

I thinks I have ti incorporate something like [^ ] in the regex but I wasn't successful...

View 3 Replies View Related

General :: Remove Words In A File Using Sed Or Any Other Command?

Nov 30, 2009

i want to remove words "Max" and "constrained" in a file given below:

Max 0.003745 constrained
Max 0.004549 constrained
Max 0.001689 constrained

[code]....

and further want to replace "Max" by line number so that i can plot the resulting file. i searched in forum, but couldn't do what i wanted to do. e.g. i used

1)grep command

grep -v "Max" inputfile >outputfile

deletes whole line,and hence whole text.

2) sed command

cat inputfile |sed 's/ .{1,12} //g' >outputfile

gives output

0.003745constrained
0.004549constrained
0.001689constrained

[code]....

View 4 Replies View Related

General :: Remove Words / Text In Directory?

Feb 24, 2011

I have a folder with many many files. e.g html, docs, excel sheet, script etc.
Now I want to find {using grep command}a certain word in that folder/directory and delete it in all the files and scripts that have it.

For example, I want to delete the word /testing (with the slash) in all files in a directory.

View 14 Replies View Related

General :: Sed - Change And Capitalize Some Letters In Words?

May 9, 2011

I'm trying to use Sed to change all "l" letters with "I" in capitalized words something like this:

1. ONlON -> ONION

- and as opposite change the all "I" with "l" in a word in small letters such as:

2. DiIbert -> Dilbert

For the first case I'm using the below sentence which unfortunately changes words such as "let" in "It"

Code:

sed 's/[:upper:]*l[:upper:]*/I/g' test.srt

For the second case the below command seems to work but it might have a side effect as the one used in the first case:

Code:

sed 's/[:lower:]*I[:lower:]*/l/g' test.srt

View 7 Replies View Related

General :: Find MP3 Files Without ID3 Tags?

Jan 21, 2011

I have a lot of mp3 files without any ID3 tag information. This is very annoying, because my iPod does not show them correctly. My Banshee shows them as "unknown artist" and the title. I would like to find them all in a bunch to batch update them.

View 2 Replies View Related

General :: Find Duplicate Files By Name ?

Jul 24, 2010

We have a huge amount of duplicate files in a folder and I would like some pointers on to writing a bash script to create a list of the duplicate files. I've seen examples that check for the md5 sum of files... but I dont need that, the file name is enough.

View 4 Replies View Related

General :: Find Which Files Were Transferred?

Nov 30, 2010

Say someone logs into a Centos Linux box and SCPs a file from /root/ called 'textfile.dat'

Is there any way to log into the Centos Linux box, later, and see that textfile.dat was SCP'd from the box?

View 9 Replies View Related

General :: Find One Day Older Files?

May 31, 2011

I used following command to sort one day older log files

Quote:

find /opt/TimesTen/tt_transaction_log/ -name "mtsDB.log*" -mtime +1 -print

following are log files which are existing, I have to delete one day older files from this location but when use above mentioned command it won't print one day older files, as i understand "-mtime" modified time, "+1" means one day older. am i correct?

Code:

-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:11 mtsDB.log126985
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:17 mtsDB.log126986
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:23 mtsDB.log126987

[code].....

How can i print one day older logfiles?

View 3 Replies View Related

General :: Find Size Of The Files?

Jun 8, 2011

To find the space occupied by files modified more than 4 years ago, i tried following.I am wondering if it is right ?

Code:

find /temp -type d ! -name ".*" -mtime +1460 | wc -l |du -sh

I tried this, but this sits there for long time (of couse the path i tried has lot of files) So i am not sure if this is right.

P.S.:

SHELL=bash
OS=RHEL5

View 9 Replies View Related

General :: Find Text Within Files?

Nov 23, 2010

find text within files? detailed at Code: man grep

View 2 Replies View Related

General :: Find Big Files On The Disk?

Oct 17, 2010

How can I find big files on the my Linux disk with say more than 500MB in size?

View 2 Replies View Related

General :: Using Find To Exclude Some Files

Dec 7, 2010

I'm trying to find all java files in bash that contains the method "assign()".I would like to retrieve the same list except without the Test* files. How can I do that?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved