Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

56 bytes removed, 10:03, 12 January 2021
Part 1: Creating Text Files Using The Nano Text Editor
===Part 1: Creating Text Files Using The Nano Text Editor===
<table align="right"><tr><td>[[Image:directory-structure-10.png|right|200px|thumb|]]</td><td>[[Image:nano-text-editor-2.png|right|400px|thumb|Enter the following text that appears in this diagram.]]</td></tr></table>
You will now learn basic editing skills using the '''Nano''' text editor including '''creating''', '''editing''', and '''saving''' text files.
# '''Create''' the following directory structure (displayed on the right side) by issuing a '''single Linux command''' (You should know how to do this from the previous INVESTIGATION).<br><br>
# Issue a Linux command to check that you correctly created those directories.<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 textedit/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>[[Image:nano-text-editor-2.png|right|400px|thumb|Enter the following text that appears in this diagram.]]
# Enter the lines shown in the other diagram of the nano text editor on the right side.<br><br>'''NOTE:''' Refer to the table below for a list of the most common Nano navigation &amp; editing commands:<br><table cellpadding="5"><tr><th style="border-bottom: 1px solid black;">Key(s)</th><th style="border-bottom: 1px solid black;">Purpose</th></tr><tr><td style="font-family:courier">'''&lt;ctrl&gt;&lt;SPACEBAR&gt;'''</td><td>Move forward one word</td></tr><tr><td style="font-family:courier">'''&lt;esc&gt;&lt;SPACEBAR&gt;'''</td><td>Move back one word</td></tr><tr><td style="font-family:courier">'''&lt;ctrl&gt;&lt;k&gt;'''</td><td>Cut line</td></tr><tr><td style="font-family:courier">'''&lt;esc&gt;^'''</td><td>Copy Line ('''Note:''' to get '''^''' character, type '''&lt;shift&gt;6''', <u>not</u> <ctrl>)</td></tr><tr><td style="font-family:courier">'''&lt;ctrl&gt;&lt;u&gt;'''</td><td>Paste Cut/Copied Text</td></tr><tr><td style="font-family:courier">'''&lt;ctrl&gt;&lt;g&gt;'''</td><td>Display help screen (ctrl-x to exit help screen)</td></tr></table><br>
# Referring to the table above, practice navigating and editing your entered lines for practice.<br><br>
13,420
edits

Navigation menu