0% found this document useful (0 votes)
90 views3 pages

BAIT3113 Pre Assessment Question-202405

Uploaded by

Yap Hoong chun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views3 pages

BAIT3113 Pre Assessment Question-202405

Uploaded by

Yap Hoong chun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BAIT3113 Systems Administration

Pre Assessment (Linux Basic Commands)


Test yourself
Name: _______________________________
Student Registration ID:_________________________________

Programme & Tutorial Class: _________________________ 50 marks

Instructions:
Answer ALL questions.

Q1. What is the command for each of the following tasks?


a. list the contents of a directory

b. link a file to another (soft-link)

c. copy a file

d. display the absolute pathname that you are working with


(4 marks)

Q2. What is the command for each of the following tasks?


a. rename a file

b. find a directory

c. delete a file or directory

d. edit a file
(4 marks)

Q3. Given the vi command for performing the following.


a. delete the current character

b. delete the current line

c. save the current file to a new file name

d. quit from current file


(4 marks)

Q4. Write a command for each of the following tasks.


a. display the login shell

b. show your current shell

c. change the primary prompt of the Korn shell to “KSH:”


(3 marks)
BAIT3113 Systems Administration

Q5. Write a command for each of the following questions:


a. Use a command to create a file called memo and attach a calendar for December 2007 to
your memo.

b. Use a command to get the calendar for the month of July in the year 2232.

c. Write a command to show the date and time using each of the following formats:
i. Friday, November 21, 2008
ii. Hours : 08 Minutes : 22 Seconds : 24

d. Use the who command and redirect the result to a file called file1.

e. Can we use the tee command to create a file? Explain how.

f.

(a) Refer to the directory tree structure as above, if your current working directory is heroes,
write a single command to reach the chars directory using absolute path.
Answer: (Absolute path):

(b) Refer to the directory tree structure as above, if your current working directory is heroes,
write a single command to reach the chars directory using relative path.
Answer: (Relative path):

(10 marks)

Q6. Write a command/answer for each of the following questions:


a. Create a directory called garbage under your home directory

b. Check the permission of this directory. Make a note of it.

c. Change your default mask so that the default file permission is 664. What is the default
permission for directories after you make this change?

d. Delete this directory

e. Create a directory called chapter_4/session_II under the home directory (without moving from
your home directory)

f. Remove the x permission for the user (all users) from session_II directory

g. Move to the session_II directory. Identify the problem and fix it.

2
BAIT3113 Systems Administration
h. Create a file name hw_4 under this directory and check the permission of this file.

i. Can users in your group copy this file? Can they change this file?

j. Change the permissions of this file so that every user can read, modify, but not execute this file.
(15 marks)

Q7. Write a script file named calvalue that:


a. Stores 5 in variables A.
b. Stores 10 in variables B.
c. Stores the sum of A plus B in variable C.
d. Stores the difference of B minus A in variables D.
e. Stores the product of A times B in variable E.
f. Stores the quotient of B divided by A in variable F.
g. Displays the contents of all the variables.
(10 marks)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy