Solved

Large file ( about 7 g )

Posted on 2012-03-09
4
371 Views
Last Modified: 2012-06-26
Hi, Experts -
I have a large file (about 7g) that I need to search for a text and replace.
How do I go about doing it thru windows commands. Addition to that - suggest a few good text editors for large files (e.g textpad won't work file of that size). I prefer to do it thru cmd window.

Thanks,
0
Comment
Question by:ivan_belal
4 Comments
 
LVL 5

Accepted Solution

by:
Jason Schlueter earned 500 total points
ID: 37703415
PowerShell should be able to handle something of that size but you will need to write the results to a second file.

Get-Content c:\hugefile1.txt
    | Foreach-Object {$_.Replace('thing to replace', 'what to replace it with')}
    | Set-Content c:\hugefile2.txt
0
 
LVL 91

Expert Comment

by:nobus
ID: 37704354
0
 

Author Comment

by:ivan_belal
ID: 37720241
PowerShell seemed to work, thanks.
Any other text editors able to handle large files (~7 gig) ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now