Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit a text file on the console using Powershell

I'm trying to figure out the easiest way to edit text files in the console (PowerShell in my case). I'm using Windows 7 64 bit. It galls me that I can't just type edit filename.txt to edit a file. That used to work, but that's all changed. What are my options to view and edit text files within the windows console, and if you tell me to install and learn VIM I'm going to punch you in the face. :-)

like image 570
Busilinks Avatar asked Jun 15 '12 05:06

Busilinks


People also ask

Is there a Text Editor in PowerShell?

The Nano text editor will open within PowerShell.

How do you edit a .TXT file?

How to use Text Editor. First, select a text file from your computer, Google Drive, or GMail attachment. The file will be displayed in your browser where you can then make any changes or edits. After edits are made, press the "Save to Drive" button to save the edited file back to Google Drive.

How do you edit a text file in terminal Windows?

Just type micro to create and edit a new text file. Type micro <filename> to start editing an already-made file. To save: ctrl + s.


2 Answers

Why not use notepad?

notepad.exe filename.txt 

The old edit.com works in PowerShell (at least on my box: Windows 7 Pro x86) but in x64 it doesn't work due to its 16bit architecture.

You can take a look at this easy editor.

like image 141
CB. Avatar answered Sep 29 '22 18:09

CB.


Kinesics Text Editor.

It's super fast and handles large text files, though minimal in features. There's a GUI version and console version (k.exe) included. Should work the same on linux.

Example: In my test it took 7 seconds to open a 500mb disk image.

screenshot

like image 41
user2164194 Avatar answered Sep 29 '22 19:09

user2164194