2.1 Enter a : and press [Enter]. Next run type :. What do you conclude? correct 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?
correct 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. correct
answers printf, script, and passwd.
2.4 Find out whether these commands are internal or external: echo, date, pwd, and ls. correct
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? correct 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? correct answers With a dot.
2.7 How many options are there in this command? ls -lut chap01 note3 correct answers
Three.
2.8 If you find yourself using options preceded by two hyphens (like --all), which flavor of
UNIX could you be using? correct answers Linux.
2.9 What is the name given to the command and its options and arguments? correct answers
The command line.
2.10 How do you find out the version number of your operating system? correct answers
uname -r.
2.11 Why are the directories /bin and /usr/bin usually found first in PATH? correct 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. correct 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? correct
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
correct answers fname is supposedly a variable, so it should be prefixed with a $.