0% found this document useful (0 votes)
15 views

COMP301-Lab-1

Uploaded by

detoc49752
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

COMP301-Lab-1

Uploaded by

detoc49752
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Unix /Linux COMP301

Lab #1

Instructions:
Be sure to read the following general instructions carefully:

• This lab should be completed individually by all the students.


• You must submit this document with your answers through the drop box:
• You will be asked to demo your solutions in-person the following week.
• 100% of your mark would be based on your in-person demo of the solution.

Academic Integrity
• PLAGIARISM is an Academic Offence
• Doesn't help you learn the course material
• Giant waste of your time and mine
• Causes mark penalties and transcript annotations
Unix /Linux COMP301

Requirements

• Please run through all the exercises.


• Submit in the drop box screen captures of the ones highlighted in RED [
Command and output provided by shell]
• You might be selected for a Lab 1 interview, therefore please make sure you
do all exercises in this lab and be ready for an in-person demo

1. Make the directory bin under your home directory


2. Change your working directory to bin
3. Confirm that you were able to change your working directory?
4. Create multiple empty files under your current working directory
5. List all the files and directories in your current working directory?
6. Provide the long listing of all the files and directories in your current working directory
7. Save the long listing of all the files and directories in your current working directory into a file called
binListing. This file should be under your home directory (~/binListing)
8. Move back to your home directory
9. Display the content of the binListing
10. List all items in your home directory including hidden files using the long option and not the short option, while
your current working directory is bin directory
11. List all items in your home directory in reverse order
12. List all items in your home directory including the hidden files, in reverse order, and using the long listing
format
13. Create a new empty file called COMP301-Monday.txt using the touch command
14. List all items in your home directory
15. Remove the file COMP301-Monday.txt
16. Copy file hostname under directory etc into your home directory and call it myhostname
17. Create an alias for the command ls -alr
18. Use the new alias to list all items in your home directory in reverse and using the long listing option including
the hidden files,
19. Create a new file using the vi tool
20. Insert a poem of your choice in the new file using the vi tool
21. Using the vi tool demonstrate you can:
a. Delete a character
b. Delete a line
c. Undo your change
d. Add a new line
e. Copy and Paste several lines
f. Delete Several lines

You might also like