Google Answers Logo
View Question
 
Q: linux review questions ( Answered,   2 Comments )
Question  
Subject: linux review questions
Category: Computers > Operating Systems
Asked by: katauro-ga
List Price: $20.00
Posted: 16 Dec 2004 03:43 PST
Expires: 15 Jan 2005 03:43 PST
Question ID: 443359
1. UNIX commands are case sensitive. In which case must you type them?
a.	all uppercase 
b.	all lowercase 
c.	sentence case, so the first letter is capitalized and others are lowercase 
d.	any combination of uppercase and lowercase

2. In which order are UNIX commands given? 
a.	name, arguments, options 
b.	name, options, arguments 
c.	options, name, arguments 
d.	arguments, options, name

3.	Which of these statements is false?
a.	Linux is compatible with UNIX.
b.	Ordinary users cannot change the system date.
c.	The UNIX operating system is called the kernel.
d.	You cannot change the shell after you select one.

	4.	In a	network, all users' data and applications are centrally located
		on one system.
a.	peer to peer
b.	server based
c.	standalone
d.	workstation

7.	Use the UNIX date command to
a.	display the system calendar
b.	display any date in the future
c.	reset the system date
d.	display the system date

8.	The man program provides
a.	a programming guide
b.	an online reference for command syntax
c.	a file template
d.	an operating system version

11.	What type of operating system best describes UNIX?
a.	a multi user, multitasking operating system
b.	an operating system that conducts all its operations on a standalone PC
c.	an operating system with a graphical user interface
d.	a portable single user operating system

13.	When viewing a file with the cat command, you can
a.	edit the file
b.	only view the file
c.	spell check the file
d.	delete the file


14.	After creating a file with the cat > filename command, if you use
the command again with the same filename, you
a.	append new information to the file
b.	overwrite the file
c.	create anew file
d.	delete the file

	15.	The less command fixes the	command's scrolling limitation.
a.	cat
b.	more
c.	clear
d.	date

18.	The password should not contain
a.	numbers
b.	uppercase letters
c.	control characters
d.	the underscore character

19.	The > symbol may be combined with	to create output.
a.	only the cat command
b.	any command that produces output
c.	only the who command
d.	only the cal command

20.	The	commands display only the first or last few lines of a file.
a.	first and last
b.	cat  first and cat  last
c.	viewhead and viewtail
d.	head and tail

21.	Multiple commands entered on the same command line must be separated by a
a.	space
b.	semicolon (;)
c.	colon (:)
d.	comma (,)

22.	One major difference between the system administrator and ordinary users is
a.	the system administrator has unlimited permission to alter the system
b.	the system administrator does not have to log on to the system
c.	the system administrator must enter commands in uppercase letters
d.	ordinary users can change some system settings, but not all

23.	The symbol that ordinary users see as their command prompt is the
a.	colon (:)
b.	pound sign (#)
c.	slash character (I)
d.	dollar sign ($)




	29.	The	 symbol directs command output to a file.
a.	*
b.	$
c.	>
d.	<
Answer  
Subject: Re: linux review questions
Answered By: maniac-ga on 16 Dec 2004 16:46 PST
 
Hello Katauro,

As mentioned in the comment, some of the questions may be misleading
and many of the answers are not exactly true in all cases. To produce
a proper answer, I will explain both the typical answer and some
alternatives that could make that "typical" answer incorrect. If some
part of this is still unclear after reading the answer - I suggest you
request a clarification so I can expand on the answer as needed.

[01] Case of commands:
b. is the typical answer. Almost all Unix commands are created with
lower case names. The more proper answer is not listed - that the case
must match the file name of the command being executed. I can choose
to name a program like
  myProgram
and you would have to type its name in as I shown (all lower case would not work).

[02] Order of unix commands:
b. again is the typical answer but not necessarily true. The name of
the command is first (at least for all the shell's I've used). Phrases
after the name are processed by the command and historically have been
in the order of options and then arguments. For example, on my system
if I enter
 % ls *.txt -l a.a
 ls: -l: No such file or directory
  YAAP-v.txt      yaap-k-dn.txt   yaap-t04.txt
  a.a             yaap-m.txt      yaap-w.txt
which indicates that the -l (long) option to ls was interpreted as a
filename argument. There is no firm requirement that this order be
adhered to. A command that mixes options and arguments (in my mind) is
find.
  http://unixhelp.ed.ac.uk/CGI/man-cgi?find
which has a path argument before the expression options. [sigh]

[03] False statements.
b. again is the most likely answer. On most Unix systems, an ordinary
user cannot change settings that affect system operations. Setting the
system time is one of those commands that is prohibited. I can make
arguments against the other choices [e.g., Linux and BSD Unix systems
are not compatible in some very minor ways].

[04] I assume this reads...
  In a ________ network ...
and in that case, b. (server based) is the best fit. Another term for
this is a "thin client" which does not have a local disk (or a very
small one) and must get all its programs and data from a file server.
None of the other choices imply this kind of architecture.

[07] Use Unix date to...
d. (Display the system date) is the most likely answer. However b.
display any date in the future (or past) is also possible on the Unix
system I use (use -r). Also the super user can use c. to set the
system date/time. For reference, see
  http://unixhelp.ed.ac.uk/CGI/man-cgi?date
Only a (display calendar) is strictly incorrect - use cal for that.

[08] man provides...
b. (command syntax) is certainly the most common use of man. However,
there are sections (e.g., 2, 3) which have programming information (a)
and some sections (usually 5) have explanation of file contents (c).
If you want the OS version, try uname (or more precisely uname -r).

[11] What type of operating system best describes UNIX?
a. (multi user, multitasking) is the traditional choice. I can
certainly configure a Unix system for b (standalone PC - single user).
Answer c (OS w/ GUI) is not quite accurate but it is what naive users
may consider correct. Answer d (portable, single user) is not quite
right, it is portable but not single user.

[13] viewing a file with cat
b. (view the file); note the similarity of the question and answer.
cat will not let you edit, spell check, or delete files.

[14] Repeating cat > filename command
b. (overwrite the file) is the typical answer. However,  many shells
have a "noclobber" option that prevent the overwrite. Refer to
  http://unixhelp.ed.ac.uk/CGI/man-cgi?sh
for more details. Of course when you "overwrite" the file the old
contents are lost (deleted) and new contents are written (created).
[sigh]

[15] The less command fixes the _____ command's scrolling limitation.
Hmm. Depending on WHAT scrolling limitation is being described the
answer is a (cat) or b (more). On a modern Unix system, less IS more
[it is on the system I use...] Cat for example will dump the file to
your display without stopping so it scrolls continually. The comment
suggests (a) but I don't consider cat to have a "scrolling limitation"
[scrolling is a function of your display device -  not the cat
program].

[18] The password should not contain
I would say c (control characters) is the most likely answer. a, b,
and d are definitely allowed (as well as a lot of other printable
characters). There are some control characters that you COULD put into
passwd (to set the password) but you could get into a situation where
you cannot enter the password.

[19] The > symbol may be combined with _______ to create output.
b. (any command producing output). All the commands listed in a, c,
and d work as well - just not "only" that command.

[20] The ____ commands display only the first or last few lines of a file.
d. (head and tail). On my Unix system there is no "first" command (but
last does exist). cat prints the whole file. On my Unix system there
is no viewhead nor viewtail. Use man or apropos with these names to
check it out on your system.

[21] separate multiple commands on a line with
b. (semicolon - ;) is correct. Spaces separate arguments / options.
colon (:) is a "null command" on my system. There may be a use for
comma (,) but I could not find it - it definitely does not separate
commands.

[22] administrator and user difference
a. is the historical answer. However, there are high security versions
of Unix / Linux being developed where this is not necessarily true.
Also note that if I bring up the system in "single user" mode, (b)
also is true. This generally means you must secure access to the
system console to secure a Unix system. Answer c is clearly false -
see the answer to #1. Answer d is generally false (though some Unix
systems allow exceptions through "capabilities").

[23] The command prompt for ordinary users
Hmm. It is percent (%) on my system. Answer b (#) is what the super
user gets as a prompt. The answers are all incorrect on my system, but
as the comment notes - the user can change the prompt.

[29] The ___ symbol directs command output to a file.
c. (>) is correct for "standard output". Error messages can also be
directed to a file using 2> (or other methods). As a side comment, a
technique I often use is
  command | tee a.txt
to capture the output of the command into a file (a.txt) as well as
see it on the display. The other answers are incorrect.

For the most part, I agree with the answers from the comment, but I
believe it is important to explain WHY as well as to give you some
methods to look up the answers on your own.

  --Maniac
Comments  
Subject: Re: linux review questions
From: crythias-ga on 16 Dec 2004 05:46 PST
 
If you don't know the answers to these questions, you are in the wrong class...
b,b,b, 
4 is misleading. The correct answer is b, but the multi-user
environment of Linux means all user's data is on one machine. OTOH, it
does say "network", so network implies server.
7- c and d but not a or b. although d is appropriate for non su
b,a,b,b,a,c,b,d,b,a,d (although changeable by user),c

Your answers may vary. This is a free comment.
Subject: Re: linux review questions
From: crythias-ga on 16 Dec 2004 20:29 PST
 
I concur with the Researcher in all points above. The reason I chose
"cat" versus "more" is that cat doesn't paginate, which is what I
suppose would be a "scrolling limitation" if context prints larger
than scrollback buffer, but the question I feel was ill-formed. I'm
using BASH prompt on BSD, and my prompt is $ for low user, but I also
agree with % being a prompt.

I must have taken this quiz some ten years ago, and the questions
haven't changed much... The problem is that so much is dependent on
the distro, the user, and the administrator that the questions and
answers could vary widely.

Also, I personally question the relevance of the questions to actually
get anything accomplished in a *nix/*BSD environment (If you aren't
aware that a network stores stuff on a server...). But one has to
start somewhere, I guess.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy