Lab Assignment 2 – Part 2 (Out-of-lab)

$24.99 $18.99

Purpose: Practice with the basic utilities for managing files and directories in terminal. Open your terminal and connect to snowball. Change your directory to your home directory (cd ~ ), and then create a new directory named as “Lab2_P2” (mkdir Lab2_P2). After that, go to directory Lab2_P2 (cd Lab2_P2) and download a test file by…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Purpose: Practice with the basic utilities for managing files and directories in terminal.

Open your terminal and connect to snowball. Change your directory to your home directory (cd ~ ), and then create a new directory named as “Lab2_P2” (mkdir Lab2_P2). After that, go to directory Lab2_P2 (cd Lab2_P2) and download a test file by the following command (internet access required):

cp /home/frondel1/public/RealEstate.csv .

Be sure it succeeds using “ls” to see the file name “RealEstate.csv” listed.

Then please write the commands you will issue to complete the following tasks step by step. (You cannot use cd to change the working directory during the steps except step (9). Each task requires only one command)

  1. You may be curious about what information is stored in this file. So please use cat to display the content in “RealEstate.csv ” using a relative pathname.

  1. We know that cat is good for showing the content of a small file. But since the file contains many lines, maybe you still cannot find out what information this files stores after step (1). So please use head to list the first three lines in “RealEstate.csv “.

  1. Use wc to check the number of homes sold out in “RealEstate.csv “.

  1. Finish the task in step (3) by using the cat command.

  1. Use mkdir to create a new directory “public” under your own home directory using relative pathname.

  1. Copy “RealEstate.csv” into your “public” directory and name it as “myRealEstate.csv”.

  1. Display the absolute pathname for current working directory.

  1. Check the existence of “myRealEstate.csv” using ls with an absolute pathname.

  1. Go into your “public” directory using relative pathname.

  1. Use mkdir to create a file structure as below in your “Public” directory using relative pathnames.

Public

Regular Submission

Lab2 Lab3

  1. Rename the directory “Regular” as “Others”.

  1. Use cp to copy directory “Lab2_P2” from your home directory to “Lab2” using relative pathname.

  1. Remove the directory “Lab2_P2” which locates at your home directory.

  1. Use history to list the commands you previously typed.

  1. Store the last 50 commands you typed neatly into a file “Lab2_2.txt”, one command per line and submit it in Google Classroom.

2

Lab Assignment 2 - Part 2 (Out-of-lab)
$24.99 $18.99