13,420
edits
Changes
→Part 1: Creating Text Files Using The Nano Text Editor
# Create the following directory structure (displayed on the right side) by issuing a single Linux command <br>(You should know how to perform this task).<br><br>
# Issue the following Linux command to edit a text file called '''mytext.txt''' in the '''linux/practice''' directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">nano uli101/practice/mytext.txt</span><br><br>'''NOTE:''' When using the '''Nano''' text editor, you are placed in '''INPUT''' mode, so you can enter text immediately.<br><br>
# Enter the lines shown in the other diagram of the nano text editor on the right side.<br><br># Refer to the table below for a list of the most common Nano editing commands:<br><br><table cellpadding="5"><tr><th style="border-bottom: 1px solid black;">Keyboard Combination</th><th style="border-bottom: 1px solid black;">Purpose</th></tr><tr><td>'''NOTE<ctrl><SPACEBAR>'''</td><td>Move forward one word</td></tr><tr><td>'''<esc><SPACEBAR>'''</td><td>Move back one word</td></tr><tr><td>'''<ctrl><k>'''</td><td>Cut line</td></tr><tr><td>'''<esc>^'''</td><td>Copy Line ('''Note:''' The to get '''^''' symbol represents press the character, type '''<shift>6''', <u>not</u> <ctrl>)</td></tr><tr><td>'''<ctrl><u>'''</td><td>Paste Cut/Copied Text</td></tr><tr><td>'''<ctrl><g>''' followed by a character</td><td>Display help screen (ctrl-x to exit help screen)</td></tr></table><br><br># Referring to the table above, practice navigating and editing your entered lines for practice.<br><br>
# To '''save''' your editing session, press: <span style="color:blue;font-weight:bold;font-family:courier;"><ctrl><x></span><br><br>
# You will be prompted to modify your file: type the letter '''y''' for yes.<br><br>
# The name of the file will be displayed: press <span style="color:blue;font-weight:bold;font-family:courier;">ENTER</span>.<br><br>'''NOTE:''' This prompt for file name allows you to change the name of the file if you wish.<br>By pressing '''ENTER''', it will accept the default filename.<br><br>
===Part 2: Creating Text Files Using The vi Text Editor===