Modify File Unix
Many choices are available in Unix to modify file including many software programs are available that could be use to create and edit files. You just need to pick right one which should be easy to use.
- vi: This UNIX command stands for visual editor and it’s most commons plain text editor available on all UNIX system. Many feels its not easy to use including me but nonetheless its popular and widely accepted. Here will not talk about vi editor but if you want to learn it please visit this tutorial
Simplest text editor I found is pico and nano.
- nano: It’s is a text editor for Unix like computing system using command line interface. To show you how to use we will use it with one file name: JavaHonk.txt as below
- Press enter it will open text editor as below:
- You could move cursor freely using keyboard and make change wherever you want. Once your editing is done click ctrl+x to exit as you will see below:
- Enter your choice Y OR N to save the file. You will see below:
- We want to overwrite our modified text on same file so just press enter file will be saved and you will be out from text editor. To verify if text is saved or not you could same command to open it.
pico: This is also same as nano text editor all commands are same as we saw on nano. To use please replace nano with pico. For more information about pico please see wiki