• Post Reply Bookmark Topic Watch Topic
  • New Topic

Use "more" to search a big file  RSS feed

 
Glen Cai
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to search a very large file. It is too large to load
the file in "vi". I can view the file using "more". Is there
a way to search the file with "more". For example, I want to
find a string "abcde" in the large file.

Thanks.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on what version of "more". In many versions, the "/" character lets you search forward. The GNU program "less" is even nicer than "more"; it has this feature, starts up faster, and also lets you move and search backwards as well as forwards.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Might be better to search the file using grep and pipe the result into something (maybe another file).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!