3
votes
3answers
233 views

Using vim to delete all lines except those that match an arbitrary set of strings

I use vim to remove all lines except those that match a particular string, e.g. :g!/[string that I want to remain in the editor]/d Works great. But what I really want, and haven't found anywhere, ...
1
vote
2answers
99 views

A method to find two strings within distance

I have a large text file collection. I'm looking for a way to find two strings that are on the same line (in the same file) in the collection where the distance in characters between those two ...
1
vote
1answer
723 views

how to search for a specific string in the body of lotus notes email

There are previous questions similar to this have been asked but never answered explicitly. Simply saving use search all documents with an indexed database is not a complete answer. How do you ...
0
votes
0answers
28 views

How to find the line containing a string in a file? [duplicate]

Possible Duplicate: How to search for a string in a line and return line and line numbers in linux? I have a file myfile. I will search for a string in this file. I want to see the line ...
1
vote
1answer
194 views

How to search for any files that do not contain a proper XML root element?

I need to be able to search several thousand XHTML and XML files and see a list of files that do not contain the following string on the first line: <?xml version="1.0" encoding="utf-8"?> How ...
0
votes
1answer
398 views

How do I find files containing two strings together in Linux? [duplicate]

Possible Duplicate: How to Combine find and grep for a complex search? ( GNU/linux, find, grep ) I have a file containing a text: PADLST20120907:D:05B:UN:IBTA+TK4 17 ...
2
votes
4answers
3k views

How to find files containing two strings together in Linux?

I want to find files containing two strings together, for example the file contains both string1 and string2. I want the full path of files in output. I don't want to see "permission denied" ...
0
votes
3answers
643 views

How to search for a string in a line and return line and line numbers in linux?

I want to search for a string in a file, and the output should give me the line number and line containing that string. How can I do it?
0
votes
1answer
928 views

How to search recursively for a string in linux?

I want to search recursively for files containing a string. I want to search: Files in and under the directory I'm standing in currently A specific directory. I want to see only results. I don't ...
0
votes
2answers
296 views

Alias for recursive case insensitive search in current directory

How do I set an alias, such as "mysearch", which will search for a string recursively in the directory I'm standing in. It should be as below: mysearch "this table..." = find -type f -exec grep ...
0
votes
2answers
344 views

Search recursively for a string containing whitespaces

I want to search for "this table..." string under /home/myuser directory recursively, ie in all files under /home/myuser and in all directories and sub-directories under /home/myuser. /home/myuser ...
0
votes
1answer
711 views

FINDSTR to search string in files in a specified set of extensions

I want to search for a string in files which end with .asp, .config, and .txt. In other words I want to query asp, web.config, or text files for that particular string. I found that the /G switch ...
0
votes
2answers
80 views

check Mac folders for missing item

Is there a way to check folders on your Mac for a missing item? Say I want to scan my external hard drive, and find all of the folders with a certain word in the title, that are missing the file ...