If you can see this check that

Main Page

Introduction to Linux and nmap


Editing with nano

User:
Password:

Objectives

In this session you will be covering the basics of editing a file in Linux.

Question 1: Nano Editing

Use nano to create a file /root/edit1. Cut and paste the following text into edit1 and save the file. Remember you cannot easily cut and paste to a vnc terminal, so use telnet or ssh. Do not insert additional lines (even blank lines) or extra space characters.

asdaslkalsdklnnnne lazy dog quick frog
6f2d9937604b8422abc7493a7ff0c884 /etc/host.conf
This is an exercise!
Up, down,
left, right,
build your terminal's
muscles bit by bit

In all the editor questions you must WRITE the file in order to pass the question.

Tests - not attempted
Line 1 found somewhere UNTESTED
Line 2 found somewhere UNTESTED
Line 3 found somewhere UNTESTED
Line 4 found somewhere UNTESTED
Line 5 found somewhere UNTESTED
Line 6 found somewhere UNTESTED
Line 7 found somewhere UNTESTED
All edits complete UNTESTED

Delete the word "an" from line 3, plus one of the spaces. The line left should read "This is exercise!".

Tests - not attempted
line check UNTESTED

Add " and byte by byte" to the end of the line "muscles bit by bit".

Tests - not attempted
line check UNTESTED

Append to the end of the file a new line which reads:

123456789 123456789
Tests - not attempted
All edits complete UNTESTED

Using mark (^^ i.e. CTRL and ^) mark the whole of the first line of the file and then cut (^K) that line out. Move that line and paste it back in (^U) so that the line is now line 2 in the file. Edit afterwards to make sure there is not a blank line left at the start.

Tests - not attempted
All edits complete UNTESTED

Now cut out the long hex word on line 1 (beginning 6f2 and ending 884) Leave this first line with a leading space. Now put this hex number at the end of the last line (after 6789) making sure to put a space between the 6789 and the 6f2. Save the file.

Tests - not attempted
All edits complete UNTESTED


Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 Mail
Caine 6.0: Essentials | Basic | Search | SysIntro | 5a | 5b | 5c | 6 | 7a | 7b | 8a | 8b | WebBrowserA | WebBrowserB | Registry | Browser
Digital Investigation: Editing | Email | Logs | Strength
Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2017 Edinburgh Napier University