Basic VI editor and VIM

abgncvengr
timer Asked: May 1st, 2018

Question Description

NOTE FOR TUTOR

1. KEEP LAB 2D (AKA PART 1) AND LAB 2E (AKA PART 2) FILES IN SEPARATE FOLDERS FOR SUBMISSION.

2. ALL REQUIRED FILES FOR BOTH PARTS ARE INCLUDED IN THE ZIP.

3. PLEASE INCLUDE SCREENSHOTS OF THE COMMAND SCREEN WHENEVER POSSIBLE, THE NAME SHOULD READ "NAWSAFMBP" IN TERMINAL/UNIX IF YOU DO SO, YOU MIGHT HAVE TO RENAME YOUR PC FOR THIS.

PART 1: Lab 2D

Learnings

§Basic usage of the Vim editor

§Vim commands and functions

§Using a command line text editor

Part I: the VimTutor

For this lab you will be following the instructions found in the VimTutor.

IGNORE THE PARTS ABOUT MOVING TO SPECIFIC DIRECTORIES, BECAUSE THEY ARE ON A DIFFERENT SERVER, PROCEED TO WORK ON YOUR SYSTEM AND INCLUDE ALL THE FILES YOU WORKED WITH.

1.Move to your IFT250directory and run the command vimtutor

2.As soon as the file opens, save it to your home directory by typing the following:

:wqLab2C.vim

Note the colon(:) as that lets Vimknow you are typing a command.

2.This creates the file you will be editing for your lab. Any time the instructions have you close and reopen the tutor do so by typing:

vimLab2C.vim

3.Otherwise, follow the instructions for each lesson as they are written in the VimTutor file. Make sure to complete every tasks listed and you have saved all of your edits in the Lab2C.vimfile

PART 2: Lab 2E

Learnings

§Using vi commands to edit/format files

§Explain the output of the long listing command with respect to file attributes

§Demonstrate ability to change file permissions in both relative and absolute way

Part I: Process Data

Consider the files L2E1.iva, L2E2.iva, and L2E3.ivaon Blackboard along with this lab. This is the raw performance data collected on a solar photovoltaic module installed at the ASU Polytechnic campus. The 3 files correspond to 3 repeated measurements and must be processed to determine the performance output of the system or panel.

Download the L2E1.iva, L2E2.iva, and L2E3.ivafiles and upload them into the General server into the ~/IFT383/Unit2/Labsfolder.

For this lab, you will use the techniques learned up to Unit 2 to edit and format the data from these three files to obtain a single file named lab2E.1.prcthat resembles the following:

F gge0001x gge0001y gge0001z

D 12-30-2006 12-30-2006 12-30-2006

T 14:05:23 14:05:55 14:06:28

S a69 a69 a69

B 15.4 15.3 15.7

M gge06001 gge06001 gge06001

P 30.8 30.6 30.3

Q 19.2 21.1 23.5

R 1006.2 1006.6 1008

U 1012.7 1014.6 1014.1

X 36.2 36.1 36.6

A 38.994 38.994 38.994

G 107.71 107.71 107.71

H 8.411 8.433 8.434

O 37.084 36.705 36.508

C 7.537 7.621 7.546

K 28.198 27.623 27.574

W 212.52 210.51 208.08

L 68.1 68 67.6

You will use vi create a file called lab2E.1.sbsthat explains the steps that you followed to create the processed file including all commands and pipelines.

Part II: Checking the List

For this part of the lab fill out the table below with the correct value and answer the following questions.

The following is the results of running the ls -alcommand on the directory tests:

11

drwx------ 2 kuitche kuitche 2048 Oct 23 20:59 awk

-rw------- 1 kuitche kuitche 808 Jul 24 2000 bin.doc

drwxrwxrwx 3 kuitche root 2048 Jul 12 14:04 junk

-rwxrwxrwx 1 kuitche root 21504 Jul 13 2000 this.jpg

1.Complete the table below

File name

File type

File size

(in bytes)

File Owner

Group permissions

awk

bin.doc

junk

this.jpg

1.What is the size of the testsdirectory in bytes?

2.What is the command you would use to change the permissions on the file this.jpgthe owner is able to read, write, and execute, the group owner is only able to read, and everyone else is able to read and execute?

3.What would be the output of the following sequence of UNIX commands?

bash3.2$ echo this is a script file > script.bash

bash3.2$ chmod 342 script.bash

bash3.2$ ls –al script.bash

4.If you do not know the existing permissions, how would you remove execute and write permissions from everyone but the owner of the file foo.shwithout altering any other permission?


User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors