Workshop 8
Workshop 8
Assessment Type
Logbook 8
Semester
2023/24 Spring
I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am
fully aware that late submissions will be treated as non-submission and a mark of zero will be awarded.
Table of Contents
1 AIM.........................................................................................................................................4
2 OBJECTIVES.........................................................................................................................4
3 REQUIRED TOOLS AND RESOURCES...............................................................................4
4 STEPS REQUIRED................................................................................................................5
4.1 Create the directory structure..........................................................................................5
4.2 Change to the 8cat-grep directory using a relative pathname........................................5
4.3 Create two files using the cat utility.................................................................................5
4.4 Explain the results of the following ‘grep’ commands.....................................................6
4.5 Define the ‘lsal’ alias........................................................................................................7
4.6 Remove the ‘lsal' alias.....................................................................................................8
4.7 Define the ‘lsal’ alias again and show that the system keeps it......................................8
4.8 Define the ‘nwho’ alias....................................................................................................9
4.9 Execute the ‘nwho’ command.........................................................................................9
4.10 List your last commands using the history command................................................10
4.11 Re-execute the last but one command using the ‘fc’ command................................11
4.12 Re-execute the command given three commands ago using the negative integer.. .11
4.13 Re-execute the last command which name begins with 'l'........................................12
5 CONCLUSION......................................................................................................................13
TABLE OF FIGURES
Figure 1 : "Initiating the creation of the '8cat-grep' directory for organized file management.......................5
Figure 2 : Navigating into the '8cat-grep' directory using a relative pathname.............................................5
Figure 3 : Creating 'testa' and 'testb' files with specific content using the 'cat' command............................5
Figure 4 : Analyzing the outcomes of 'grep' commands for pattern matching and line manipulation...........6
Figure 5 : Creating and employing the 'lsal' alias for a concise directory listing...........................................7
Figure 6 : Removing the 'lsal' alias and verifying that the system no longer stores it...................................8
Figure 7 : Recreating the 'lsal' alias and confirming its persistence for the next session.............................8
Figure 8 : Recreating the 'lsal' alias and confirming its persistence for the next session. (2).......................9
Figure 9 : Creating the 'nwho' alias for counting system users....................................................................9
Figure 10 : Executing the 'nwho' command................................................................................................. 9
Figure 11 : Displaying the list of recently executed commands with the 'history' command.......................10
Figure 12 : Re-executing the second-to-last command using the 'fc -r' command.....................................11
Figure 13 : Re-executing the command from three commands ago using the negative integer with '!-3'...11
Figure 14 : "Re-executing the last command starting with 'l' using the 'fc -e- l' command.........................12
1 AIM
This workshop's main aim is to introduce us with basic Unix tools, with a particular focus
on how to use commands in the Ubuntu environment practically. The goal is to gain an
understanding of directory management, file creation, and manipulation with tools like
mkdir, cat, and grep through hands-on demonstrations. we will also learn how to create
and utilize identities for frequently used commands, which will improve our ability to
navigate and interact with the Unix system more effectively.
2 OBJECTIVES
The objective of this workshop is to familiarize us with the fundamental Ubuntu Unix
commands. The goals are to create a directory structure, practice manipulating files with
`cat`, and learn about the powerful `grep` program for text manipulation. The actual use
of identities, including setting up and maintaining shortcuts like 'lsal', will be explained.
Through system user counting, the `nwho` term introduces system interaction and
monitoring. Using `history} and `fc}, the workshop will explore command history for
effective recall and re-execution. Together, these goals provide us with useful Unix
abilities for efficient file manipulation and command-line navigation.
- Ubuntu: Ubuntu is a popular Linux-based operating system known for its user-friendly
interface and open-source nature.
- Terminal on Ubuntu: It provides a command-line interface (CLI) for executing
commands, making it ideal for various tasks, including system administration and
scripting.
- MS word: MS word is a popular app for documentation, and we need this tool for
logbook documentation.
4 STEPS REQUIRED
Figure 1 : "Initiating the creation of the '8cat-grep' directory for organized file management.
Figure 3 : Creating 'testa' and 'testb' files with specific content using the 'cat' command.
4.4 Explain the results of the following ‘grep’ commands.
Figure 4 : Analyzing the outcomes of 'grep' commands for pattern matching and line manipulation
4.5 Define the ‘lsal’ alias.
Figure 5 : Creating and employing the 'lsal' alias for a concise directory listing.
4.6 Remove the ‘lsal' alias.
Figure 6 : Removing the 'lsal' alias and verifying that the system no longer stores it.
4.7 Define the ‘lsal’ alias again and show that the system keeps it.
Figure 7 : Recreating the 'lsal' alias and confirming its persistence for the next session.
Figure 8 : Recreating the 'lsal' alias and confirming its persistence for the next session. (2)
Figure 11 : Displaying the list of recently executed commands with the 'history' command.
4.11 Re-execute the last but one command using the ‘fc’ command.
Figure 12 : Re-executing the second-to-last command using the 'fc -r' command.
4.12 Re-execute the command given three commands ago using the
negative integer.
Figure 13 : Re-executing the command from three commands ago using the negative integer with '!-3'.
4.13 Re-execute the last command which name begins with 'l'.
Figure 14 : "Re-executing the last command starting with 'l' using the 'fc -e- l' command
5 CONCLUSION
In conclusion, we gained useful skills for efficient file manipulation and command-line
navigation on Ubuntu. we learned essential information while working on activities
including creating directories, experimenting with the `grep` program, and manipulating
files with `cat`. The `lsal} shortcut was used in the workshop to illustrate the
effectiveness of identities, and the `nwho} alias was used to explain system monitoring.
Using `history} and `fc}, we also enhanced their command recall and re-execution
abilities. Through practical application, we get an understanding of Unix utilities,
allowing us to perform tasks within network operating systems and developing an
inquiring and creative mentality when interacting with command-line interfaces.