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 |