Thursday, May 11, 2023

Time flies!

 In a blink of an eye, So many things have happened. I couldn’t believe I can achieve most of my goals. Bought a house, and saved enough for traveling and saved enough amount to allow me to slow down my pace a bit. 

I changed a few jobs even though I love my jobs and the people in all my jobs, I always try not to get too involved as I will not bears to leave the places and people behind. Sometimes I don’t even understand why I choose to go and seek someplace where they offer a higher salary. Money is always not everything since I left the banking industry many years back and took up an IT job. Maybe the surrounding and the culture make me change my mindset when I am not thinking clearly.

I am still doing what I love, helping people around me like serving the community during the Covid period and doing volunteering by disturbing food. also returning back to help out in the pharmacy clinic after office hours. I committed too much of my time and overlook to contact most of my friends and family member.  Sadly few of my close family and friend all passed away. I attended and organized most of the funerals and I am so regretful that I didn’t spend more time with them. 

Our time is always invaluable that we can't purchase back, we're only here on earth for a brief lifetime and no matter how much money we have won't buy us more time than anyone else. for this, I have decided to drop some of the things I am doing now and focus on other aspects. I am so sorry that I can't help as I need to heal myself.

To end this, cherish those you think are kind people and treat you back the way you always wanted, because those people are hard to come by as you get older. Cheers and hope everyone is still doing well in 2023! 

Friday, January 1, 2016

First Post in 2016!

This will be a tough year as I set on many short term goals to achieve! I will try to accomplish it by this year! Good thing is I have fulfilled my goal in 2015 to earn and save up 100k! Overall is not about the money and I felt like it is a stupid goals that I have set for the last 2 year and doing thing that I have zero interest but to allow myself to do what I really want without any debt or borrowing from friend. I have finally left my position on banking and financial last year and pursue my career in what I studies during polytechnic and I have been in this field for almost 3month. Initially is hard but my colleague is nice to help me out. I will still need to improve myself more on this field as I know I am still not good enough at it.


Goals for this year!                                                             
  • Get CCNA this year.
  • Get driving license 
  • Understand fully Stock Market 
  • Backpack to try Travel alone! i alway really wanted to do this for a long time.


Press on!! 

Saturday, August 15, 2015

Coursework ICND1/1

Problem 1

Identifying Collision and broadcast domain.

In the following exhibit, identify the number of collision domains and broadcast domains in each specifies device. Each device is represented by a letter:
A. Hub
B. Bridge
C. Switch
D. Router

A.  (Hub)
Diagram 1
Ans: 
BoardCast Domain : 1
Collision Domain : 1


Diagram 2

Ans: 
BoardCast Domain : 1
Collision Domain : 1

Diagram 3
Note: Entire Hub is a collision Domain.
Without a router connected, broadcast Domain will away remain as 1

Ans: 
BoardCast Domain : 1
Collision Domain : 1



B. (Bridge)
Diagram 1
Note: Entire Hub is a collision Domain.

Ans: 
BoardCast Domain : 1
Collision Domain : 2






C. (Switch)


Diagram 1
Note: every port used on the switch is a collision
Ans: 
BoardCast Domain : 1
Collision Domain : 3


Diagram 2


Note: 3 PC connected to the switch created 3 collision and entire hub connected to the switch belong to 1 single collision


Ans: 
BoardCast Domain : 1
Collision Domain : 4





D. (Router) 


                                                                      Diagram 1



*Router do not allow Broadcast domain and multicast to go through! 
* Without a router connected, broadcast Domain will away remain as 1 but with router , it have created 3 broadcast domain. Every port used on the router create a broadcast domain.  Note: Entire Hub is a collision Domain.

Ans: 
BoardCast Domain : 3
Collision Domain : 3

Diagram 2


For switch ,every port that is been used is a collision domain. Switch and Hub connected to the router have created two more collision domain.  Note: Entire Hub is a collision Domain.

Ans: 
BoardCast Domain : 2
Collision Domain : 5

Diagram 3



Ans: 
BoardCast Domain : 2
Collision Domain : 7



Problem 2

Convert the following from binary format to decimal IP adddress.
Complete the following table to express 11001100.00110011.10101010.01010101 in decimal IP address format.

128       64       32       16       8       4       2       1       Decimal

Working: 

128

32

128

64

64

16

32

16

+         8

+         2

+         8

+         4

4

1

2

1

______

______

______

______

204

51

170

85



Ans: 204.51.170.85

Convert from decimal IP address to binary format.
Complete the following table to express 192.168.10.15 in binary format.

128       64       32       16       8       4       2       1       Decimal

Working: 

 192(base10) = 1100 0000 (base 2)
 168(base10) = 1010 1000 (base 2)
 10  (base10) = 0000 1010 (base 2)
 15  (base10) = 0000 1111 (base 2)

Ans: 1100 0000. 1010 1000. 0000 1010. 0000 1111






Problem 3

Given the following IP address and subnet mask determine thier respective Network ID and HostID
1) 212.100.200.123
    255.255.255.0

Ans:

Network ID
Host ID

212.
100.
200.
123
AND
255.
255.
255.
0
Net ID
212.
100.
200.
0
Host ID
0.
0.
0.
123

Step 1: Draw a vertical line before the 0 on subnet mask. everything before the 0 on subnet mask belong to Network ID and everything on the 0 onward will belong to Host ID
Step 2: in order to get Net ID we use 212 and AND (logic gates) with 255.
255 in binary code is 1111 1111(base 2) and 212 in binary code will be 11010100 (base 2). note: if you can remember clearly everything multiply with 255 will result in same number.

   1101 0100
     x        1111 1111

               1101 0100

Then do the same on the rest at only Network ID .

                          Network ID


212.
100.
200.

AND
255.
255.
255.

Net ID
212.
100.
200.

Do take note not to multiply anything on the Host ID portion , i know 123 AND with 0 will result in zero. But to get the Net ID you only do multiply on Network ID portion and the rest will be just zero.



Network ID
Host ID

212.
100.
200.
123
AND
255.
255.
255.
0
Net ID
212.
100.
200.
0←





Step 3: to get the Host ID it is even more simple. on the Network ID portion it will alway be zero.


                                 Network ID


212.
100.
200.

AND
255.
255.
255.

Host ID
0.
0.
0.


then on the Host ID portion you just copy everything down or i can simply say it you OR (logic gates) it. 123 + 0 = 123.


Network ID
Host ID

212.
100.
200.
123
AND
255.
255.
255.
0
Host ID
0.
0.
0.
123←

2)183.6.45.124
    255.255.0.0 


Network ID
Host ID

183.
6.
45.
124

255.
255.
0.
0
Net ID
183.
6.
0.
0
Host ID
0.
0.
45.
124


3} 12.205.3.224
     255.0.0.0

Network ID
Host ID

12.
205.
3.
224

255.
0.
0.
0
Net ID
12.
0.
0.
0
Host ID
0.
205.
3.
224


Friday, February 7, 2014






I have been working in this particular company for 6 month introduce by my friend after my graduation , how time flies! Due to restriction i am only allowed to post non specific detail, not even my company name! i am working in the Finance Field as a sales executive which have no related to what i had studied in poly. My job is to put myself in this competitive sales and marketing field which i find it very stressful and mentally tired. but everyday i keep remind myself that I have nothing to lose and everything to gain. This help me keep on going when i think i cant.

I need to work almost 7 days a week as we need to focus on sales especially on weekend which attract the most crowd. i find i have so little time for myself and sometime I wish I hadn't worked so hard. i rememeber at the start of the few days of my work i told my friend (who introduce me into this job) that i find this job is very stressful and no prospect, in the first place this is no a working environment i wanted. he replied me that cost of living in Singapore is very high and inflation keep on rising. he said i can choose to work in the office and a basic salary of $1600 - $1800 or choose to work harder here to use this sum of money to do what i want later on.

Monday, January 27, 2014

there will be no more post regarding scl stuff. i have graduated last year

Failed my M9 exam the second time, working full time and studying at the same time are really hard to manage. hope i am able to pass on the 3rd time.

Tuesday, March 19, 2013

Glossary

The following are some common terms you might come across during this 3 year, it is used for easy reference only.
Term DEFINITION
10BaseT This is one of several adaptions of Ethernet (IEEE 802.3) standard for Local Area Networks(LANs). The 10Base-T standard (also called Twisted Pair Ethernet) uses a twisted-pair cable with maximum lengths of 100 meters. Cables in 10Base-T system connect with     RJ-45 connectors. A star topology is common with 12 or more computers connected directly to a hub or concentrator. Also see Ethernet, LAN and RJ-45 connectors.
Bandwidth  The amount of data that can be transmitted in a fixed amount of time. For digital devices , the bandwidth is usually expressed in bits per second (dps) or bytes per second. For analog devices, the bandwidth is expressed in cycles per second, or Hertz (Hz).
Cache A cache stores recently used information in a place where it can be accessed extremely fast. For example, a web browser like Netscape Navigator uses a cache to store on your hard drive the pages, images, sounds and URLs of web sites you visit. This means that everything doesn't have to be downloaded to your computer all over again when you visit the page again. Because accessing your computer's hard disk is much faster than accessing the internet, this speeds up web browsing significantly.
Data transfer rateAlsio known as throughput, this is the speed with which data can be transmitted from one device to another. Data rates are often measured in megabits(Mbps) or megabytes (MBps) per second. DHCP Short for Dynamic Host Configuration Protocol, it is a protocol for assigning dynamic IP addresses to devices on a network. with dynamic addressing, a device can have a different IP address every time it connects to the network. Also see IP address.
DNS This is short for Domain Name System (or Service). Every time you use a domain name, a DNS service must translate the name into corresponding IP address. For example, the domain name www.sp.edu.sg might translate to 192.168.42.129. Also see Domain Name and IP Address. <you can check the Domain Name by using NSlookup at the command prompt>
DOCSIS/ DOCSIS-compliantDeveloped bby CableLabs and approved by ITU in march 1998, Data Over Cable Service Interface Specification (DOCSIS) defines interface standards complaint for cable modems and supporting equipment, With certification from CableLabs, manufacturers will be able to produce cable modems for retail, so consumers no longer have to depend on leased cable modems from thier cable providers.
Domain name A name that identifies one or more IP address. For example, the domain name microsoft.com represents about a dozen IP addresses. Domain names are used in URLs to identify particular Web pages. For example, in the URL http://www.sp.edu.sg, the domain name is SP.EDU.SG. Also see DNS and IP address. <you can check the domain name by accessing to this website http://www.checkdomain.com/>
Downstream
Channel
A downsteam channle is one used to transmit signals from the headend to the user.
Ethernet Ethernet is the most common type of connection computers use in a local area network (LAN). the most widely used forms of Ethernet are called 10BaseT with data transfer speeds up to 10 mbps and 100BaseT with transfer speed to 100 mbps. Also see 10BaseT and LAN
Hop An intermediate connection in a string of connections linking two network devices. On the internet, for example most data packets need to go through several routers before they reach thier final destination. Each time the packet is forwarded to the next router, a hop occurs. The more hops, the longer it takes for data to go from source to destination. You can see how many hops it takes to get to another internet host by using PING or traceroute utilities. Also see Ping and Traceroute.
Host A computer system that is accessed by a user working at a remote location. The system that contains the data is called the host, while the computer at which the user sits is called the remote terminal
Hub A common connection point for devices in a network. Hubs are commonly used to connect segments of a LAN. A hub contains multiple ports. When a packet arrives at one port, it is copied to other ports so that all segments of the LAN can see all packets. Also see LAN
IMAP Short for Interner Message Access Protocol, it is a protocol for retrieving e-mail messages. Like POP, IMAP uses SMTP for communications between the e-mail client and server. Also see POP and SMTP.
IP address An identifier for a computer or device on a TCP/IP network. Networks using the TCP/IP protocol route messages based on the IP address of the destination. The format of an IP address is a 32-bit numeric address written as four number separated by periods. Each number can be zero to 255. For example 1.160.10.240 could be an IP address. Also see DHCP, DNS, Domain Name and TCP/IP
LAN / local A computer network that spans a relatively small area. Most LANs are confined to a single building or area network group of buildings.
MAC Short for Media Access Control address, it is a hardware address that uniquely identifies each node of an address network. In IEEE 802 network, the Data Link Contorl(DLC) layer of the OSI Reference Model is divided into two sublayers: the Logical Link Control (LLC) layer and the Media Access Control (MAC) layer. The MAC layer interfaces directly with the network media. Consequently, each different type of network media requires a different MAC layer. Also see 10BaseT and Ethernet.
Newsgroup An on-line discussion group. To view and post messages to a newsgroup, you need a newsreader, a program that runs on your computer and connects you to a news server on the internet. 
Ping Short for Packet Internet Groper, it is a utility to determine whether a specific IP address is accessible. It works by sending a packet to the specified address and waiting for a reply. PING is used primarily to troubleshoot internet connections. Also see IP Address and Trace route.
POP Short for Post Office Protocol, it is a protocol used for email service. Also see IMAP and SMTP.
Proxy server A proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server and the proxy server evaluates the request as a way to simplify and control its complexity. Today, most proxies are web proxies, facilitating access to content on the World Wide Web.Diagram of two computers connected only via a proxy server. The first computer says to the proxy server: "ask the second computer what the time is".
RJ-45 Short for Registered Jack-45, it is an eight-wire connector used commonly to connect computers onto a local-area network (LAN), especially Ethernets. RJ-45 connectors look similar to the ubiquitous RJ-11 connectors used for connecting telephone equipment, but they are somehwat wider. Also see 10BaseT and Ethernet.
SMTP Short for Simple Mail Tranfer Protocol, It  is a protocol for sending e-mail message between servers. Most email systems that send mail over the internet use SMTP to send messages form one server to another; the messages can then be retrieved with an e-mail client using either POP or IMAP. in addition, SMTP is generally  used to send messages from a mail client to a mail server. This is why you need to specify both the POP or IMAP server and the SMTP server when you configure your e-mail application. Also see POP and IMAP
TCP/IP Short for Transmission Control Protocol/Internet Protocol, it is the suite of communications protocols used to connect hosts on the internet. TCP/IP uses several protocols, the two main ones being TCP and IP. TCP/IP is built into the UNIX operating system and is used by the internet, making it the de facto standard for transmitting data over networks.
Throughput *See Data Transfer Rate
Traceroute A utility that traces a packet fro your computer to an internet hotse, showing how many hops the packet requires to reach the host and how long each hop takes, if you're visiting a Web site and pages are apperaing slowly, you can use traceroute to figure out where the longest delays are occurring. Windows includes a traceroute utility called tracert. in windwos 95, you can run tracert by selecting Start->Run...cmd, and then entering tracert followed by the domian name of the host. For example: tracert www.sp.edu.sg. Also see Host and Hop
Upstream channel an upstream channel is a frequency band that is used to send signal from the user to the headend.
USB Short for Universal Serial Bus, it is a new external bus standard that supports data transfer rate of 12 Mbps (12million bits per second). USB also supports Pulg-and-Play installation and hot plugging. Also see Data Transfer Rate
UTP Short for Unshielded Twisted Pair, a popular type of cable that consists of two unshielded wires twisted around each other. Due to its low cost, UTP cabling is used extensively for local-area network (LANs) and telephone connections.

Saturday, June 9, 2012

ET0023 OPERATING SYSTEMS [rha030-workbook-student-5.0-2]

Questions
Workbook 1
Workbook 1 / Chapter 1. Logging In

1.Which of the following best describes why Linux is referred to as a multiuser operating system?
( ) a. Multiple users can use the same machine simultaneously, using multiple network connections and dumb
terminals.
( ) b. Multiple users can use the same machine, but only one at a time.
( ) c. Many people contributed to the development of the Linux operating system.
( ) d. Linux is not referred to as a multiuser operating system.

2. Which of the following is not an advantage of using virtual consoles instead of a graphical interface?
( ) a. Virtual consoles often respond more quickly than graphical environments.
( ) b. Virtual consoles operate at the kernel level, and so can be used to debug the system when higher level
components are mis-configured.
( ) c. Virtual consoles are very intuitive, and help is available in an obvious manner.
( ) d. Graphical environments add a lot of complexity to a system, and can make them harder to maintain.

3. From the first virtual console, which key sequence(s) will take you to the second virtual console?
( ) a. CTRL-ALT-2
( ) b. CTRL-ALT-F2
( ) c. CTRL-2 (using the numeric keypad)
( ) d. None of the above.

4. From the X graphical environment, which key sequence(s) will take you to the second virtual console?
( ) a. ALT-F2
( ) b. CTRL-ALT-F2
( ) c. Both a and b.
( ) d. None of the above.

5. If a user has logged into the X graphical environment, but desires to use a terminal command line interface, how
might she go about obtaining a terminal?

( ) a. Using the CTRL-ALT-F3 key-sequence to switch to a virtual console.
( ) b. Clicking the terminal icon that appears in the bottom panel.
( ) c. Right click in the desktop, and choose "Open Terminal" from the pop-up menu.
( ) d. Both a and c

6. What does the who command report?
( ) a. The users who have logged onto the machine since midnight.
( ) b. The users who are currently logged onto the machine, and where they logged on from.
( ) c. The users who are currently logged onto the machine, and how much time they have remaining before
their session expires.
( ) d. The command is used to lookup users from an Internet database of all users.

7. Which of the following is NOT required in order to open a remote shell using ssh?
( ) a. The remote machine must be running the ssh service.
( ) b. You must know the username and password of an account on the machine.
( ) c. The local machine must be a Linux machine.
( ) d. You must know the hostname or IP address of the remote machine.

Workbook 1 / Chapter 2. The Kernel, Programs, and Processes
1.Which of the following is not considered an operating system?
( ) a. Red Hat Enterprise Linux
( ) b. Windows XP
( ) c. Microsoft Office
( ) d. Mac OS X

2. Which of the following is not true for the Linux operating system?
( ) a. Multiple processes appear to be running at the same time.
( ) b. Only one instance of any given program may be running as a process.
( ) c. Programs are stored as files in the filesystem.
( ) d. Only one instance of the kernel may be running at any given time.

3. Which of the following is a true statement?
( ) a. Only the root user may run processes from a shell.
( ) b. The shell is a process that is commonly used to execute other processes.
( ) c. The shell is the kernel component that interacts directly with hardware.
( ) d. Only one instance of a shell may be running as a process.

4. Which of the following is the default shell for Red Hat Enterprise Linux?
( ) a. /bin/bash
( ) b. /bin/tcsh
( ) c. /bin/zsh
( ) d. /bin/sh

5. Which of the following is the command for listing processes?
( ) a. ps
( ) b. lsps
( ) c. lps
( ) d. ls

Workbook 1 / Chapter 3. Examining the Filesystem


1. Assuming the shell’s current working directory is /home/elvis, which of the following would refer to the file
/home/elvis/Mail/sent?
( ) a. Mail/sent
( ) b. /Mail/sent
( ) c. sent
( ) d. /sent

2. As the user elvis, whose shell’s current working directory is /home/elvis, which of the following would refer to
the file received, which is in the directory Mail, which is in the home directory?
( ) a. /home/elvis/Mail/received
( ) b. Mail/received
( ) c. received
( ) d. both A and B.

3. Which of the following commands would list the files in the /usr/lib directory?
( ) a. cat /usr/lib
( ) b. lsdir /usr/lib
( ) c. /usr/lib list

( ) d. ls /usr/lib


4. Which of the following commands would successfully redirect the output of the cal to the file lsout.txt?
( ) a. lsout.txt > cal
( ) b. cal ==> lsout.txt
( ) c. cal > lsout.txt
( ) d. cal } lsout.txt

5. For the user elvis, with /home/elvis for a home directory, which of the following commands would succeed on
a default Red Hat Enterprise Linux installation?
( ) a. ls /etc > /etc/lsetc.txt
( ) b. /etc/lsetc.txt < ls /etc
( ) c. ls /etc > /home/elvis/lsetc.txt
( ) d. /home/elvis/lsetc.txt < ls /etc


Workbook 1 / Chapter 4. Running Commands 


1. Which of the following would be a legitimate invocation of the touch command?
( ) a. touch -k /etc/services
( ) b. touch -ac /etc/services
( ) c. touch -nocreate /etc/services
( ) d. touch -t

2. Which of the following would be a legitimate invocation of the touch command?
( ) a. touch -frm /etc/services
( ) b. touch --cm /etc/services
( ) c. touch --no-create -a /etc/services
( ) d. touch


3. Which best describes why madonna got the "file arguments missing" error message when running touch -r
/etc/services?
( ) a. The -r command line switch requires an argument, which madonna didn’t supply.
( ) b. The file /etc/services does not exist.
( ) c. The touch command could not be found on the system.
( ) d. -r is not a supported command line switch.

4. Which best describes why madonna got the "command not found" error message when running tooch
/etc/services?
( ) a. The file /etc/services does not exist.
( ) b. madonna misspelled the command name, and no command named tooch could be found.
( ) c. The touch command requires a mandatory -a command line switch.
( ) d. madonna does not have the right permissions to execute the command.

5. Which best describes why madonna got the "invalid option" error message when running touch -k /etc/services?
( ) a. The file /etc/services does not exist.
( ) b. madonna misspelled the command name, and no command named touch could be found.
( ) c. The touch command requires a mandatory -a command line switch.
( ) d. The touch command doesn’t support the -k command line switch.

6. When madonna ran the command touch -r /etc/services /tmp/foo, what best describes the role of the word
/etc/services?
( ) a. The word serves as an argument to the touch command.
( ) b. The word serves as an argument to the -r command line switch.
( ) c. The word serves as the name of the command to run.
( ) d. The word is misplaced, and caused the command to exit in failure.

7.When a user runs the command who from the command line, which of the following best describes what happens?
( ) a. The shell asks the kernel to execute the contents of the file /usr/bin/who as a separate process,
displaying the process’s output on the terminal.
( ) b. The shell makes the who system call, prompting the Linux kernel for the output directly.
( ) c. The shell exits, and is replaced by the who process.When the who process terminates, it replaces itself
with a new shell process.


8. When long command line switches were introduced, which best describes why they were preceded with a double
hyphen (such as --size) instead of a single hyphen (such as -size)?
( ) a. The creators of long command line switches liked to type a lot.
( ) b. The word -size could be interpreted as a shortcut for the -s -i -z -e short command line switches, instead of
a single long command line switch.
( ) c. A single hyphen already implied a mandatory command line switch argument.
( ) d. The creators of long command line switches liked to make things complicated.

Workbook 1 / Chapter 5. Managing Terminals


1.Which of the following commands can restore a terminal to sane behavior?
( ) a. sanetty
( ) b. reload
( ) c. start-unicode
( ) d. reset
( ) e. sane

2. Which of the following control sequences can be used to suspend a command?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z

3. If you walk up to a terminal that seems completely non-responsive, which control sequence might restore activity?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z

4. If you suspect that you have mistyped while entering a password, which control sequence would allow you to start
over?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-Q
( ) d. CTRL-U
( ) e. CTRL-Z


5. If you want to cancel a command that is generating too much output, which control sequence would be most
helpful?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

6. If you want to freeze the terminal output, so that you can resume it later, which control sequence would be most
helpful?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

7. Which control sequence causes bash to clear the screen?
( ) a. CTRL-C
( ) b. CTRL-D
( ) c. CTRL-L
( ) d. CTRL-S
( ) e. CTRL-U

Use the output from the who command to answer the following questions.
[prince@station prince]$ who
blondie tty2 Apr 21 22:07
elvis tty1 Apr 21 22:07
elvis tty3 Apr 21 22:07
root tty6 Apr 21 22:07
prince :0 Apr 21 21:50
prince pts/0 Apr 21 21:53 (:0.0)
prince pts/1 Apr 21 21:54 (:0.0)
prince pts/2 Apr 21 21:55 (:0.0)
madonna pts/3 Apr 21 22:08 (:0.0)


8. How has the user blondie logged onto the Enterprise Linux machine?
( ) a. Using the Login Manager in the X graphical environment.
( ) b. A virtual console.
( ) c. A serial line connected terminal.
( ) d. A ssh network connection
( ) e. The login method cannot be determined with the information provided.

9. How has the user prince logged onto the Enterprise Linux machine?
( ) a. Using the Login Manager in the X graphical environment.
( ) b. A virtual console.
( ) c. A serial line connected terminal.
( ) d. A ssh network connection
( ) e. The login method cannot be determined with the information provided.

10. Which user logged on as the administrative user root?
( ) a. blondie
( ) b. elvis
( ) c. madonna
( ) d. prince
( ) e. It cannot be determined with the information provided.

Workbook 1 / Chapter 6. Getting Help


1.Which of the following is not a way to obtain help for the ls command?
( ) a. help ls
( ) b. ls --help
( ) c. man ls
( ) d. pinfo ls
( ) e. All are legitimate ways of obtaining help.

2. When viewing a man page, which key causes the pager to quit?
( ) a. Z
( ) b. TAB
( ) c. q
( ) d. RETURN
( ) e. SPACE

3. Which chapter of the man pages would contain documentation on the /etc/group configuration file?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8


4. Which chapter of the man pages would contain documentation on the groups command?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8

5. Which chapter of the man pages would contain documentation on filename suffixes, and the type of file that they
imply?
( ) a. 1
( ) b. 4
( ) c. 5
( ) d. 7
( ) e. 8

6. In the table listing man page chapters, chapter 6 was omitted.What does this chapter contain information on?
( ) a. Unix history
( ) b. hardware devices
( ) c. networking protocols
( ) d. graphical applications
( ) e. games

7. Which of the following commands would generate a keyword search of the man pages for the word sleep?
( ) a. mankey sleep
( ) b. man --key sleep
( ) c. man -key sleep
( ) d. keyword sleep
( ) e. None of the above commands would work.


8. Informally structured documentation is found where in a Red Hat Enterprise Linux distribution?
( ) a. Red Hat Enterprise Linux only includes formally structured documentation.
( ) b. /usr/share/doc
( ) c. /usr/doc
( ) d. /usr/doc/share
( ) e. /tmp/doc/

9. Which of the following interfaces to the info pages allows someone to navigate links with mouse clicks?
( ) a. The pinfo command.
( ) b. The info command.
( ) c. The yelp application.
( ) d. A and C

10. What type of help can be viewed with the GNOME Help Browser, yelp?
( ) a. documentation for GNOME graphical applications
( ) b. man pages
( ) c. info pages
( ) d. A and C
( ) e. All of the above

Workbook 2
Workbook 2 / Chapter 1. Filesystem Navigation


All these questions assume you are logged in as user student on a typical classroom system.
1. Which of the following is a relative directory reference?
( ) a. /home/student
( ) b. /etc
( ) c. ..
( ) d. ~

2. Which of the following could have been displayed by pwd?
( ) a. home/student
( ) b. /etc
( ) c. ..
( ) d. ~

3. Following the command cd ~, which is the most likely result from pwd?
( ) a. /home/student
( ) b. /etc
( ) c. ..
( ) d. ~
Your screen shows the following:
[student@station html]$ cd ../bin
[student@station bin]$ pwd
/home/student/bin
[student@station bin]$ cd -



4. What would be the output of the command pwd?
( ) a. /home/student
( ) b. /home/student/html
( ) c. /home/html
( ) d. -

5. Which of the following pairs of commands always produce the same effect?
( ) a. cd .. and cd -
( ) b. cd / and cd root
( ) c. cwd and pwd
( ) d. cd ~ and cd


Workbook 2 / Chapter 2. Important Directories


1.Which of these is most likely not someone’s home directory?
( ) a. /home/student
( ) b. /root
( ) c. /
( ) d. None of these - all are likely to be home directories

2. The file named.conf is a system configuration file. This file belongs in
( ) a. /tmp
( ) b. /etc
( ) c. /bin
( ) d. /sbin

3. The file e2fsck is a privileged command that must always be available to the system. This file would be found in
( ) a. /tmp
( ) b. /etc
( ) c. /bin
( ) d. /sbin

4. The /root directory is noteworthy because
( ) a. It is the root of the Linux filesystem
( ) b. It is the superuser’s home directory
( ) c. It can always be abbreviated as ~
( ) d. Its contents cannot be read by any user.

5. Which of the following commands could not be used to create a file in /tmp?
( ) a. touch /newfile
( ) b. touch /tmp/newfile
( ) c. touch ../newfile
( ) d. touch ../tmp/newfile



6. T/F: /bin and /usr/bin contain the same files.
( ) a. True
( ) b. False

7. T/F: Only the root user can read files in etc.
( ) a. True
( ) b. False

8. T/F: Files for a website might often be found in /var.
( ) a. True
( ) b. False

9. T/F: Configuration files that customize each user’s account are placed in /etc/users.d.
( ) a. True
( ) b. False

10. T/F: X uses /tmp.
( ) a. True
( ) b. False


Workbook 2 / Chapter 3. Managing Files


1. The command to make a duplicate of a file is
( ) a. dupe
( ) b. rep
( ) c. copy
( ) d. cp

2. To copy file1.txt to file2.txt, you could use
( ) a. cp file1.txt > file2.txt
( ) b. cp file1.txt file2.txt
( ) c. dupe file1.txt file2.txt
( ) d. mv file1.txt file2.txt

3. The successful command mv f1 f2 f3 f4
( ) a. moves four items from the current directory
( ) b. moves four items to the current directory
( ) c. moves four items to the default directory
( ) d. moves three items from the current directory

4. To erase the file file1 from the current directory, you could use
( ) a. rm file1
( ) b. erase file1
( ) c. del file1
( ) d. cut file1

5. The command cp file.a file.b will clobber file.b if
( ) a. file.a is an ordinary file
( ) b. file.a is non-empty
( ) c. file.b is an ordinary file
( ) d. file.b is a directory


6. If /home/student is a directory, then the command rm /home/student will
( ) a. remove all files in the directory
( ) b. delete the directory from the filesystem
( ) c. delete the student user account
( ) d. produce an error message

7. The command echo file.1 file.2 will
( ) a. copy file.1 to file.2
( ) b. display the contents of file.1 and file.2 on STDOUT
( ) c. produce an error message because there is no redirection symbol
( ) d. display "file.1 file.2" on STDOUT

8. The command ls > file.1 will
( ) a. produce an error message because > is an unprotected shell meta-character
( ) b. append the normal output of ls to file.1
( ) c. replace file.1 if it already exists
( ) d. fail if file.1 already exists

9. Assuming both exist, the command mv item.1 item.2 will move an entire subdirectory tree
( ) a. only if both item.1 and item.2 are existing subdirectories
( ) b. only if special command options are used
( ) c. only if item.2 is empty
( ) d. only if item.1 is empty

10. The command cp item.1 item.2 will copy an entire subdirectory tree
( ) a. only if both item.1 and item.2 are existing subdirectories
( ) b. only if special command options are used
( ) c. only if item.2 is empty
( ) d. only if item.1 is empty

Workbook 2 / Chapter 4. Managing Directories

1.Which command will list the contents of the directory report recursively?
( ) a. lsdir report

( ) b. ls --recur report
( ) c. ls -r report
( ) d. ls -R report
( ) e. ls report \r



The user hogan is executing the following command.
[hogan@station hogan]$ cp rep1.txt rep2.txt rep3.txt reps



2. For the command to succeed, which of the following statements must be true?
( ) a. The file rep1.txt must be a text file.
( ) b. The file rep1.txt must be an existing directory.
( ) c. The file reps must be an existing directory.
( ) d. The files rep1.txt, rep2.txt, and rep3.txt must be existing directories.
( ) e. The command cannot succeed, because the -r command line switch must be specified when using multiple arguments.

3. Which command creates a new, empty directory?
( ) a. md
( ) b. nd
( ) c. mkdir
( ) d. newdir
( ) e. touch -d
In his home directory, hogan has a directory called website, which contains various files and subdirectories, and a
currently empty directory called archive, as illustrated in the following graph.
.
|-- archive/
‘-- website/
|-- forms/
|-- html/
| |-- index.html
| |-- page1.html
| |-- page2.html
| ‘-- page3.html
‘-- media/
|-- photos/
| |-- picture1.png
| ‘-- picture2.png
‘-- songs/
|-- song1.midi
‘-- song2.midi


For the following questions, assume that the current working directory is hogan’s home directory, /home/hogan.

4. What would be the effect of the following command? cp -r website archive
( ) a. The directory archive would be clobbered, and replaced with a copy of the website directory.
( ) b. The directory archive would contain a new subdirectory called website.
( ) c. An error, because the cp command does not work on directories.
( ) d. An error, because -r is not a legitimate switch for the cp command.
( ) e. None of the above

5. What would be the effect of the following command? cp website archive/website.bak
( ) a. The directory archive would contain a new subdirectory called website.bak.
( ) b. An error, because the directory archive/website.bak does not exist.
( ) c. An error, because the -r command line switch must be included when copying directories.
( ) d. An error, because the correct command to use is cpdir.
( ) e. None of the above

6. What would be the effect of the following command? mv -r website archive
( ) a. The directory archive would be clobbered, and replaced with the website directory.
( ) b. The directory archive would contain a new subdirectory called website.
( ) c. An error, because the mv command does not work on directories.
( ) d. An error, because the mv command does not recognize the -r command line switch.
( ) e. None of the above

7. Which of the following commands would move the website/media directory and its subdirectories to
archive/media
( ) a. mv -r website/media archive/media
( ) b. mv website/media archive/media
( ) c. mv website/media archive
( ) d. Both B and C
( ) e. All of the above


8. Which of the following commands would remove the website/media directory and its subdirectories?
( ) a. rmdir website/media
( ) b. rm website/media
( ) c. rm -r website/media
( ) d. Both A and C
( ) e. All of the above

9. Which of the following commands would copy the website directory, and all of its subdirectories except
website/media/photos?
( ) a. cp -x photos website archive
( ) b. cp -d2 website archive
( ) c. cp -x photos website archive/website
( ) d. cp -d2 website archive/website
( ) e. None of the above

10. Why would someone be tempted to use rmdir instead of rm -r?
( ) a. To ensure that overlooked files in the directory are not unintentionally erased.
( ) b. Because the rmdir command works recursively, without needing to specify a command line switch.
( ) c. The rmdir command creates an automatic backup of everything it removes.
( ) d. Both B and C
rha030-5.0-






Workbook 2 / Chapter 5. File Names and File Globbing


Note: The following questions all end in an appropriate question mark, which should not be considered part of
any specified commands.
Use the output from the following command to answer the next 5 questions.

[elvis@station files]$ ls
ebbs eras lakes lit loop olden rank renew robe run whirr
echo erect lamed lives lorry one rapid reply robed wagon whorl
elope ergo lash loads lost ounce rasp retry rock wares wile
enact erupt lead loath loves oust rays rho rocky ways windy
end evens leaks lobby lows ovary razor rigid rooms weak witty
enjoy evoke leaps locus loyal overt read rigs roses weep wools

entry ewes learn logic lucks racks reaps rime rouge wench wound
envoy lace leech login oaks radon recta riots rove west wrens
epic laced lick loin obese raged recur risks row wet writ

1. Which of the following files would be included in the output of the command ls r*s ?
[ ] a. eras
[ ] b. raged
[ ] c. rigs
[ ] d. retry
[ ] e. racks
[ ] f. wrens



2. Which of the following files would be included in the output of the command ls r?? ?
[ ] a. eras
[ ] b. row
[ ] c. riots
[ ] d. rho
[ ] e. wet
[ ] f. run

3. Which of the following files would be included in the output of the command ls [aeiou]??? ?
[ ] a. ebbs
[ ] b. lead
[ ] c. oft
[ ] d. whip
[ ] e. oaks
[ ] f. oust

4. Which of the following files would be included in the output of the command ls *[^aeiou] ?
[ ] a. ebbs
[ ] b. rove
[ ] c. one
[ ] d. rasp
[ ] e. ways
[ ] f. era


5. Which of the following files would be included in the output of the command ls [aeiou]?e* ?
[ ] a. ebbs
[ ] b. rove
[ ] c. one
[ ] d. rasp
[ ] e. ways
[ ] f. rouge







Use the following recursive listing of the /etc/X11/gdm directory to answer the following questions.
[student@station student]$ ls -R /etc/X11/gdm/
/etc/X11/gdm/:
factory-gdm.conf gnomerc locale.alias PreSession XKeepsCrashing
gdm.conf Init PostSession Sessions
/etc/X11/gdm/Init:
Default
/etc/X11/gdm/PostSession:
Default
/etc/X11/gdm/PreSession:
Default
/etc/X11/gdm/Sessions:
default Default Failsafe GNOME KDE



6. Which of the following files would be included in the output of the command ls /etc/X11/gdm/S*/*a* ?
[ ] a. /etc/X11/gdm/Init/Default
[ ] b. /etc/X11/gdm/locale.alias
[ ] c. /etc/X11/gdm/factory-gdm.conf
[ ] d. /etc/X11/gdm/Sessions/Default
[ ] e. /etc/X11/gdm/Sessions/Failsafe
[ ] f. /etc/X11/gdm/Sessions/default


7. Which of the following files would be included in the output of the command ls /etc/X11/gdm/*/*[Ef] ?
[ ] a. /etc/X11/gdm/gdm.conf
[ ] b. /etc/X11/gdm/factory-gdm.conf
[ ] c. /etc/X11/gdm/Init/Default
[ ] d. /etc/X11/gdm/Sessions/GNOME
[ ] e. /etc/X11/gdm/Sessions/KDE
[ ] f. /etc/X11/gdm/Sessions/Failsafe

8. Which of the following files could be included in the output of the command ls /etc/*.?? ?
[ ] a. /etc/issue.net
[ ] b. /etc/mail.rc
[ ] c. /etc/php.ini
[ ] d. /etc/huh.??
[ ] e. /etc/xpdfrc.ja
[ ] f. /etc/gss-1.0

9. Which of the following files could be included in the output of the command ls /etc/[akp]??[0-9]* ?
[ ] a. /etc/krb5.conf
[ ] b. /etc/as5-0
[ ] c. /etc/pbm2ppa.conf
[ ] d. /etc/a2ps.cfg
[ ] e. /etc/php.ini
[ ] f. /etc/krc8

10. Which of the following files would be included in the output of the command ls
/etc/[aeiou][^aeiou]??[aeiou]* ?
[ ] a. /etc/adjtime
[ ] b. /etc/issue
[ ] c. /etc/aeplog.conf
[ ] d. /etc/at.deny
[ ] e. /etc/at.allow
[ ] f. /etc/auto.tab



Workbook 2 / Chapter 6. Examining Files


Use the file command to help answer the following 2 questions.
1. What type of file is /usr/bin/htmlview?
( ) a. A compiled ELF Executable
( ) b. An Awk script
( ) c. A Bash (Bourne-Again) shell script
( ) d. A Symbolic Link
( ) e. A /usr/bin/perl script

2. What type of file is /dev/log?
( ) a. A character special file
( ) b. A block special file
( ) c. A socket
( ) d. A named pipe
( ) e. A compiled ELF executable


3. Which of the following commands would act the same as cp a.txt b.txt, assuming the file b.txt does not
exist?
( ) a. cat -5 a.txt b.txt
( ) b. cat a.txt b.txt
( ) c. cat -A a.txt > b.txt
( ) d. cat a.txt > b.txt
( ) e. None of the above.

4. Which of the following key sequences can be used to quit the less pager?
( ) a. q
( ) b. x
( ) c. CTRL-C
( ) d. Both A and C
( ) e. All of the above

5. While reading the file /etc/services, which of the following is an advantage of the less pager over the more
pager?
( ) a. less allows the user to browse output one page at a time, while more does not.
( ) b. less recognizes familiar navigation keys, such as UpArrow and PgDown.
( ) c. less allows users to page backwards through the file, while more only allows users to page forwards.
( ) d. less allows the user to quit with a simple q, while more requires a CTRL-C
( ) e. All of the above

6. Which of the following commands would display the first 5 lines of the file /etc/passwd?
( ) a. head -5 /etc/passwd
( ) b. head -n /etc/passwd
( ) c. head --five /etc/passwd
( ) d. head /etc/passwd > 5
( ) e. head /5 /etc/passwd

7. Why would you expect trouble from the following command?

[bob@station bob]$ head /bin/ls
( ) a. The user bob does not have permissions to read the file /bin/ls.
( ) b. The head command must be called with the -n command line switch, to specify how many lines to show.
( ) c. The file /bin/ls is too small for the head command
( ) d. The file /bin/ls is a binary file, and the head command works primarily on text files.
( ) e. None of the above.

8. How can a user stop the tail -f command?
( ) a. There is no need to, as the command times out after 10 seconds.
( ) b. By typing the q key.
( ) c. With the CTRL-Q control sequence.
( ) d. By switching virtual consoles.
( ) e. None of the above.


Use the following output to help in answering the next two questions.
[alice@station alice]$ cat -An /etc/fstab
1 LABEL=/ / ext3 defaults 1 1$
2 LABEL=/boot /boot ext3 defaults 1 2$
3 none /dev/pts devpts gid=5,mode=620 0 0$
4 none /proc proc defaults 0 0$
5 none /dev/shm tmpfs defaults 0 0$
6 /dev/hda2 swap swap defaults 0 0$

9. Which of the following is NOT true?
( ) a. The /etc/fstab file is 6 lines long.
( ) b. The columns in the /etc/fstab are separated by tabs instead of spaces.
( ) c. The /etc/fstab file is a text, instead of binary, file.
( ) d. The commands head -8 /etc/fstab and tail -6 /etc/fstab would produce identical output.
( ) e. None of the Above.

10. How would the output of the commands cat /etc/fstab /etc/fstab and head /etc/fstab
/etc/fstab differ?
( ) a. The first command would only list the contents of the /etc/fstab file once.
( ) b. The first command would display tabs as visible characters.
( ) c. The second command would only show the first 10 lines of the duplicated /etc/fstab file.
( ) d. The second command would include banners identifying the filename in the output.
( ) e. None of the Above.