Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 1 : Essential UNIX Operations Objectives At the end of this of lab, you should be able to: securely log in to a remote

Lab 1: Essential UNIX Operations
Objectives
At the end of this of lab, you should be able to:
securely log in to a remote computer running a UNIX-like operating system
read the manual page for any command
use the UNIX file system
edit a text file
Notes:
In order to get familiar with UNIX, do all your work on UNIX.
A command line interface may be harder to learn, but can be more powerful for scripting and automating tasks.
Unlike in DOS, where a command can be run in both lower- and uppercase, Unix commands are generally in lowercase.
Actions
1. Login remotely to the Gator server of KPU using PUTTY client (PUTTY is a free and open-source terminal emulator).
2. Every UNIX system maintains an internal clock that you can access to print the current system date and time. Type date to see the current date and time.
3. UNIX can be used concurrently by multiple users. Type "who" to see who is logged in.
4. Type ps to see the processes running on your terminal. You will see a process called bash (shell) is running. Note that each active process has a unique number.
5. Type "man date" to see a description of the "date" command. Type man who and man ps to see the descriptions of the who and ps commands.
6. Type "man man" to see a description of the "man" command.
7. Use the "echo" command to create a one line file (foo1) with the content:
"Quick brown fox."
8. Use the "cat" command to create a multi-line file (foo2) with the content:
First line
Second line
9. Use "vi" to save your name and student ID to foo3 text file
10. Use "ls" to list all the files in the current directory
11. Use "mv" to rename foo3 to foo4.
12. Use "cp" to make a copy of file foo4, called foo5.
13. Use "rm" to delete foo5.
14. Create a directory drafts and move foo4 there. Use utilities mkdir and mv.
15. Change working directory to drafts and list all the files. Use cd and ls.
16. Move back to your home directory and delete drafts directory. Note that rmdir would not delete a directory, unless it is already empty.
Create a directory Lab1, in the Lab1 directory create a file answers.txt.
Change your working directory to Lab1, follow the following steps, and put the answers to the following questions in answers.txt.
17.[4] Look at the man page for the "uname" command. Use the uname command with different options to find the following information.
a. The name of your machines operating system
b. The version of the operating system
c. The machine hardware name
d. The network node hostname
Specify the uname option you use and the output for each in answers.txt file.
18.[2] Explain how the "whatis" and "apropos" commands differ from the "man" command.
19.[2] Explain how you delete a non-empty directory with one command.
20.[6] Enter the following six commands, and note your observations in answers.txt:
who, tty, tput clear, id, ps and echo $$
21.[2] Run the ps and note the PID of your shell. Log out and log in again and run ps again. What do you observe?
22.[2] Create two file foo1 and foo2, with the echo command, and then use
cat foo1 foo2. What do you observe? Now run the command cat foo[12], and note your observation.
23.[2] Create a file foo containing the word hello dolly. Now create a directory bar, and then run mv foo bar. What do you observe when you run both ls and
ls bar?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago

Question

Discuss cross-cultural differences in perception

Answered: 1 week ago

Question

Compare and contrast families and family roles across cultures

Answered: 1 week ago

Question

Compare and contrast sex and gender roles across cultures

Answered: 1 week ago