IFT 250 FINAL QUESTIONS WITH VERIFIED ANSWERS
The ________ interacts with the hardware and the _________ interacts with the user -
Answers - operating system, Shell
A program is synonymous with a process. True or false? - Answers - False
Every character has a number associated with it. What is it called? - Answers - the
ASCII value
If you see a prompt like mailhost login:, what do you think mailhost represents? -
Answers - The machine name
If the system echoes Login incorrect, does it mean that your user-id is incorrect? -
Answers - Not necessarily, the password could be incorrect
Name the command you used in this chapter to display filenames. - Answers - ls
Name the command you used in this chapter to display processes - Answers - ps
Name the command you used in this chapter to display users. - Answers - who
Who are the principal architects of the UNIX operating system? - Answers - Ken
Thompson and Dennis Ritchie
Why did AT&T virtually give away UNIX to the world? - Answers - Because it was
prevented byt the US government from selling computer software
Where did BSD UNIX originate? Name some features of UNIX that were first found in
BSD UNIX - Answers - From the University of California, Berkeley.
vi editor, C shell, symbolic links, and TCP/IP
Which flavor of UNIX is available for free and runs on the PC? - Answers - Linux
Identify the companies associated with Solaris UNIX. - Answers - Sun
Identify the companies associated with AIX UNIX - Answers - IBM
Identify the companies associated with Tru64 UNIX - Answers - HP (Digital)
What does X/OPEN represent? Who owns the UNIX trademark today? - Answers - a
standards body now merged with The Open Group which owns the UNIX trademark
,Who are the two brains behind Linux? - Answers - Richard Stallman and Linus Torvalds
What is the distinctive characteristic about the GNU General Public License? - Answers
- Software developers distributing products under this license must make the source
code public.
Why is UNIX more portable than other operating systems? - Answers - Because it is
written in C, a high-level language (high-level lanuage can run without major
modifications when moved to another machine.
Can you divide UNIX into two major schools? To which school does Sun's UNIX
belong? - Answers - Yes, System V (AT&T) and BSD (Berkeley): Sun is based on BSD
but Solaris is based on AT&T's SVR4
Why do UNIX tools perform simple jobs rather than complex ones? - Answers - because
complex jobs can be completed by connecting a number of these simple ones.
What is the windowing system of UNIX known as? - Answers - The X Window system
Name some interpretive languages available on UNIX systems. - Answers - The shell,
perl, tcl, and python
Name three notable Linux flavors. - Answers - Fedora, SuSE, Ubuntu
2.1 Enter a : and press [Enter]. Next run type :. What do you conclude? - Answers - The
: must be a command that does nothing. The command type : indicates that the
command is built into the shell.
2.2 UNIX commands must be in lowercase and must not have extensions. True or
false? - Answers - False, you can use uppercase and provide extensions to command
filenames, although convention follows the opposite
2.3 Name three UNIX commands whose names are more than five characters long. -
Answers - printf, script, and passwd.
2.4 Find out whether these commands are internal or external: echo, date, pwd, and ls.
- Answers - echo and pwd are internal commands; date and ls are external.
2.5 If two commands with the same filename exist in two directories in PATH, how can
they be executed? - Answers - The command that occurs first in the PATH list would
require no special treatment. The other command needs to be used with a pathname.
2.6 How is the current directory indicated in PATH? - Answers - With a dot.
2.7 How many options are there in this command? ls -lut chap01 note3 - Answers -
Three.
,2.8 If you find yourself using options preceded by two hyphens (like --all), which flavor of
UNIX could you be using? - Answers - Linux.
2.9 What is the name given to the command and its options and arguments? - Answers
- The command line.
2.10 How do you find out the version number of your operating system? - Answers -
uname -r.
2.11 Why are the directories /bin and /usr/bin usually found first in PATH? - Answers -
Because the commonly used UNIX commands are located there.
2.12 What is whitespace? Explain the treatment the shell metes out to a command that
contains a lot of whitespace. - Answers - Whitespace is a contiguous set of spaces,
tabs, and newline characters. The shell compresses multiple contiguous whitespace
characters into a single space.
2.13 Do you need to wait for a command to finish before entering the next one? -
Answers - No, the buffer associated with the keyboard stores all input.
2.14 Why doesn't this command run in the way it is meant to? printf "Filename: %s\n",
fname - Answers - fname is supposedly a variable, so it should be prefixed with a $.
2.15 What is a pager? Name the two standard pagers used by man. - Answers - A
pager is a program that displays text on the screen a page at a time. more and less are
two standard pagers used by man.
2.16 You located the string crontab in a man page by searching with /crontab[Enter].
How do you find out the other occurrences of this string in the page? - Answers - Press
n repeatedly.
2.17 You don't know the name of the command that could do a job. What do you do? -
Answers - Try using apropos with a keyword.
2.18 How do you find out the users who are idling from the man documentation of who?
- Answers - The -u option provides information on idle time.
2.19 What is the difference between the mailbox and mbox? - Answers - Unviewed mail
is deposited in the mailbox, but viewed mail moves to the mbox.
2.20 The passwd command didn't prompt for the old password. When do you think that
can happen? Where is the password stored? - Answers - The root user is not prompted
for the old password. The password encryption is stored in /etc/shadow.
, 2.21 Can you change the system date with the date command? - Answers - Not as an
ordinary user.
2.22 Enter the uname command without any arguments. What do you think the output
represents? - Answers - The name of the operating system.
2.23 How will you record your login session in the file foo? - Answers - Run script foo at
the beginning of the session.
2.24 Interpret the following output of who am i: romeo pts/10 Aug 1 07:56
(pc123.heavens.com) - Answers - The command is run by romeo who is logged in from
a host named pc123 at the date and time shown. romeo's terminal file is pts/10.
2.25 How do you determine the erase, kill and eof characters on your system? -
Answers - Run stty -a and look for these three keywords in the output.
2.26 You suddenly find your keyboard is displaying uppercase letters even though your
[CapsLock] key is set properly. What should you try? - Answers - stty sane
3.1 How long can a UNIX filename be? What characters can't be used in a filename? -
Answers - 255 characters. The / and NULL (ASCII value 0) can't be used as filename
characters.
3.2 State two reasons for not having a filename beginning with a hyphen. - Answers - (i)
Difficult to remove such a file. (ii) Many commands interpret such filenames as options.
3.3 Name the two types of ordinary files, and explain the difference between them.
Provide three examples of each type of file. - Answers - Ordinary files can be grouped
into text and binary. A text file contains only printable characters whose ASCII values
are less than 128. A binary file can contain any character. C source programs and perl
and shell scripts are text files. Executable programs, image files, and music files are
binary in nature.
3.4 Can the files note and Note coexist in the same directory? - Answers - Yes, UNIX
filenames are case-sensitive.
3.5 Frame cd commands to change from (i) /var/spool/lp/admins to /var/spool/mail, (ii)
/usr/include/sys to /usr. - Answers - (i) cd ../../mail (ii) cd ../.. or cd /usr
3.6 Switch to the root directory with cd, and then run cd .. followed by pwd. What do you
notice? - Answers - The directory doesn't change.
3.7 Explain the significance of these two commands: ls .. ; ls -d ... - Answers - ls ..
displays all filenames in the parent directory, but ls -d .. shows .. as the parent directory
without displaying its contents.
The ________ interacts with the hardware and the _________ interacts with the user -
Answers - operating system, Shell
A program is synonymous with a process. True or false? - Answers - False
Every character has a number associated with it. What is it called? - Answers - the
ASCII value
If you see a prompt like mailhost login:, what do you think mailhost represents? -
Answers - The machine name
If the system echoes Login incorrect, does it mean that your user-id is incorrect? -
Answers - Not necessarily, the password could be incorrect
Name the command you used in this chapter to display filenames. - Answers - ls
Name the command you used in this chapter to display processes - Answers - ps
Name the command you used in this chapter to display users. - Answers - who
Who are the principal architects of the UNIX operating system? - Answers - Ken
Thompson and Dennis Ritchie
Why did AT&T virtually give away UNIX to the world? - Answers - Because it was
prevented byt the US government from selling computer software
Where did BSD UNIX originate? Name some features of UNIX that were first found in
BSD UNIX - Answers - From the University of California, Berkeley.
vi editor, C shell, symbolic links, and TCP/IP
Which flavor of UNIX is available for free and runs on the PC? - Answers - Linux
Identify the companies associated with Solaris UNIX. - Answers - Sun
Identify the companies associated with AIX UNIX - Answers - IBM
Identify the companies associated with Tru64 UNIX - Answers - HP (Digital)
What does X/OPEN represent? Who owns the UNIX trademark today? - Answers - a
standards body now merged with The Open Group which owns the UNIX trademark
,Who are the two brains behind Linux? - Answers - Richard Stallman and Linus Torvalds
What is the distinctive characteristic about the GNU General Public License? - Answers
- Software developers distributing products under this license must make the source
code public.
Why is UNIX more portable than other operating systems? - Answers - Because it is
written in C, a high-level language (high-level lanuage can run without major
modifications when moved to another machine.
Can you divide UNIX into two major schools? To which school does Sun's UNIX
belong? - Answers - Yes, System V (AT&T) and BSD (Berkeley): Sun is based on BSD
but Solaris is based on AT&T's SVR4
Why do UNIX tools perform simple jobs rather than complex ones? - Answers - because
complex jobs can be completed by connecting a number of these simple ones.
What is the windowing system of UNIX known as? - Answers - The X Window system
Name some interpretive languages available on UNIX systems. - Answers - The shell,
perl, tcl, and python
Name three notable Linux flavors. - Answers - Fedora, SuSE, Ubuntu
2.1 Enter a : and press [Enter]. Next run type :. What do you conclude? - Answers - The
: must be a command that does nothing. The command type : indicates that the
command is built into the shell.
2.2 UNIX commands must be in lowercase and must not have extensions. True or
false? - Answers - False, you can use uppercase and provide extensions to command
filenames, although convention follows the opposite
2.3 Name three UNIX commands whose names are more than five characters long. -
Answers - printf, script, and passwd.
2.4 Find out whether these commands are internal or external: echo, date, pwd, and ls.
- Answers - echo and pwd are internal commands; date and ls are external.
2.5 If two commands with the same filename exist in two directories in PATH, how can
they be executed? - Answers - The command that occurs first in the PATH list would
require no special treatment. The other command needs to be used with a pathname.
2.6 How is the current directory indicated in PATH? - Answers - With a dot.
2.7 How many options are there in this command? ls -lut chap01 note3 - Answers -
Three.
,2.8 If you find yourself using options preceded by two hyphens (like --all), which flavor of
UNIX could you be using? - Answers - Linux.
2.9 What is the name given to the command and its options and arguments? - Answers
- The command line.
2.10 How do you find out the version number of your operating system? - Answers -
uname -r.
2.11 Why are the directories /bin and /usr/bin usually found first in PATH? - Answers -
Because the commonly used UNIX commands are located there.
2.12 What is whitespace? Explain the treatment the shell metes out to a command that
contains a lot of whitespace. - Answers - Whitespace is a contiguous set of spaces,
tabs, and newline characters. The shell compresses multiple contiguous whitespace
characters into a single space.
2.13 Do you need to wait for a command to finish before entering the next one? -
Answers - No, the buffer associated with the keyboard stores all input.
2.14 Why doesn't this command run in the way it is meant to? printf "Filename: %s\n",
fname - Answers - fname is supposedly a variable, so it should be prefixed with a $.
2.15 What is a pager? Name the two standard pagers used by man. - Answers - A
pager is a program that displays text on the screen a page at a time. more and less are
two standard pagers used by man.
2.16 You located the string crontab in a man page by searching with /crontab[Enter].
How do you find out the other occurrences of this string in the page? - Answers - Press
n repeatedly.
2.17 You don't know the name of the command that could do a job. What do you do? -
Answers - Try using apropos with a keyword.
2.18 How do you find out the users who are idling from the man documentation of who?
- Answers - The -u option provides information on idle time.
2.19 What is the difference between the mailbox and mbox? - Answers - Unviewed mail
is deposited in the mailbox, but viewed mail moves to the mbox.
2.20 The passwd command didn't prompt for the old password. When do you think that
can happen? Where is the password stored? - Answers - The root user is not prompted
for the old password. The password encryption is stored in /etc/shadow.
, 2.21 Can you change the system date with the date command? - Answers - Not as an
ordinary user.
2.22 Enter the uname command without any arguments. What do you think the output
represents? - Answers - The name of the operating system.
2.23 How will you record your login session in the file foo? - Answers - Run script foo at
the beginning of the session.
2.24 Interpret the following output of who am i: romeo pts/10 Aug 1 07:56
(pc123.heavens.com) - Answers - The command is run by romeo who is logged in from
a host named pc123 at the date and time shown. romeo's terminal file is pts/10.
2.25 How do you determine the erase, kill and eof characters on your system? -
Answers - Run stty -a and look for these three keywords in the output.
2.26 You suddenly find your keyboard is displaying uppercase letters even though your
[CapsLock] key is set properly. What should you try? - Answers - stty sane
3.1 How long can a UNIX filename be? What characters can't be used in a filename? -
Answers - 255 characters. The / and NULL (ASCII value 0) can't be used as filename
characters.
3.2 State two reasons for not having a filename beginning with a hyphen. - Answers - (i)
Difficult to remove such a file. (ii) Many commands interpret such filenames as options.
3.3 Name the two types of ordinary files, and explain the difference between them.
Provide three examples of each type of file. - Answers - Ordinary files can be grouped
into text and binary. A text file contains only printable characters whose ASCII values
are less than 128. A binary file can contain any character. C source programs and perl
and shell scripts are text files. Executable programs, image files, and music files are
binary in nature.
3.4 Can the files note and Note coexist in the same directory? - Answers - Yes, UNIX
filenames are case-sensitive.
3.5 Frame cd commands to change from (i) /var/spool/lp/admins to /var/spool/mail, (ii)
/usr/include/sys to /usr. - Answers - (i) cd ../../mail (ii) cd ../.. or cd /usr
3.6 Switch to the root directory with cd, and then run cd .. followed by pwd. What do you
notice? - Answers - The directory doesn't change.
3.7 Explain the significance of these two commands: ls .. ; ls -d ... - Answers - ls ..
displays all filenames in the parent directory, but ls -d .. shows .. as the parent directory
without displaying its contents.