LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 08-01-2014, 04:29 AM   #1
RHCE_ran
Member
 
Registered: Oct 2013
Posts: 90

Rep: Reputation: Disabled
Long time to search in 6 GB file using vim editor


We have RHEL 5.x in our production setup. There is a 6 GB file which I want to inspect to find a certain string but it is not able to find the string as the vim seems to be hanging for more than 1 hr. Please advice how this searching of a string in a big file can be done. I copied the file into a windows system but Microsoft Wordpad or Microsoft Word is failing to open the file. Or, if there is a tool to open large files in Windows as an alternate would also help.

I hope my query is clear that how to search a string in a big file using vim editor.

Please revert with the reply to my query.

Regards
 
Old 08-01-2014, 04:58 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
The simplest tool for what you describe is grep

grep has many options, worth reading its manpage

but simply
Code:
grep "Your String" /path/to/file
6gb is a large file, it is going to take some time

is it a log?

https://access.redhat.com/documentat...-locating.html

that is for rhel 6, hunt for specifics on 5 if required
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Vim Editor Tips and Tricks Save Time Through Macros and Bookmarks onebuck Linux - General 5 05-26-2013 05:38 PM
LXer: Linux Vim Editor Tips and Tricks – Save Time Through Macros and Bookmarks LXer Syndicated Linux News 0 05-21-2013 12:31 AM
vim takes long time to start throughthegreens Linux - Newbie 9 03-03-2010 01:46 PM
Search number of words in vi editor at a time sohail0399 Linux - Newbie 5 10-10-2008 03:02 PM
Search on tags, edits taking a long time to post, et. al. stress_junkie LQ Suggestions & Feedback 7 09-27-2007 08:29 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration