Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to search for the occurrence of 100169200

I typed /100169200 but vi says Pattern not found


Since the question has been downvotes, I would like to make it clear that grep can find the number in the file, but vi does not.

Edit 2

For the sake of it, I download vim for windows, and it can find it. However vi in Solaris still does not work.

share|improve this question

closed as off topic by womble, Zoredache, EEAA, Shane Madden, Janne Pikkarainen Aug 5 '11 at 8:06

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

have you tried vimgrep? – MaQleod Aug 5 '11 at 5:00
I'm sorry Rosdi, but the number you are looking for is in another castle. – Janne Pikkarainen Aug 5 '11 at 5:08
Why the downvotes? Was the question not valid? As I said.. grep can find it, but vi doesn't. – Rosdi Aug 5 '11 at 6:19
What if you try to search for anything else with vi? Can you find it? Try searching for a word or number or definitely see with your own eyes while in vi. If that does not help, then you have some very strange problem. Oh, and about the downvotes: usually questions with only couple of lines in them tend to get downvotes easily. The more descriptive question, the easier to answer. – Janne Pikkarainen Aug 5 '11 at 6:42
@Rosdi: The four votes to close as off-topic should give you a hint as to the downvotes. – womble Aug 5 '11 at 7:17

Then the number isn't in the file you searched.

share|improve this answer
It is there when I grep it... I want to search in vi so that I can move back and forward. – Rosdi Aug 5 '11 at 5:08
You can search in less as well... – Sven Aug 5 '11 at 7:14
@SvenW thanks for the tip.. it works. vi still does not. – Rosdi Aug 5 '11 at 8:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.