Exam excerpts

The following are exam questions from various certification programs. Use the system documentation to find the answers.

  1. If you wanted to turn off mail notification, what command would you use?

    1. biff n

    2. mesg n

    3. mesg off

    4. notify off

    5. set notify=off

  2. Which of these commands could you use to show one page of output at a time?

    1. more

    2. less

    3. set

    4. pause

    5. grep

  3. Which commands will give you information about how much disk space each file in the current directory uses?

    1. ls -l

    2. ls -la

    3. du .

    4. ls -a

    5. ls

  4. What command would send the output of cmd1 to the input of cmd2?

    1. cmd1 | cmd2

    2. cmd1 || cmd2

    3. cmd1 && cmd2

    4. cmd1 ; cmd2

    5. cmd1 cmd2

  5. Under the bash shell, when a command is running, pressing control-Z will usually

    1. suspend the foreground task.

    2. adds an EOF to the file.

    3. kill the command running in the foreground.

    4. move the foreground task into the background.

    5. log the user off.

  6. What is the 'man' command used for?

    1. to display information about the syntax for a command

    2. it is the replacement for the 'boy' command

    3. it is a standard alias to 'ls -la | more'

    4. it is used to display formatted html pages

  7. In which file might you find the following entry: root:x:0:0::/root:/bin/bash ?

  8. Under the bash shell which is the most appropriate place to set environment variables that apply to all users?

    1. /etc/profile

    2. rc.local

    3. rc.sysinit

    4. /etc/skel

    5. /etc/bashrc

  9. Which statement describes the cron daemon?

    1. Manages scheduling of routine system tasks

    2. Manages all incoming connections and spawns off child processes

    3. Is responsible for file sharing across a network

    4. Manages the printing subsystem

    5. Keeps track of system messages and errors

  10. How can you best see how much free space you have in your current directory?

    1. Use df .

    2. Use df

    3. Use du /

    4. Use du .

    5. Use df /

  11. Which command(s) would you use to alter the permissions of a file

    1. chown

    2. change

    3. chattr

    4. chmod

    5. set

  12. Which statement describes the LPD daemon?

    1. Manages the printing subsystem

    2. Manages all incoming connections and spawns off child processes

    3. Is responsible for file sharing across a network

    4. Manages scheduling of routine system tasks

    5. Manages processes running in the background

  13. Type the full command you could use to decompress the file "foo.gz"

    1. decompress foo.gz

    2. unzip foo.gz

    3. gzip -d foo.gz

    4. gunzip -d foo.gz

    5. gunzip foo.gz

  14. What are the contents of the SSH (secure shell) file /etc/ssh_known_hosts?

    1. Public keys of known hosts.

    2. User identity.

    3. List of IP numbers of trusted hosts.

    4. List of names of trusted hosts.

    5. Private keys of known hosts.

  15. cat < foo.bar > cat ; cat cat | xargs -iV touch V # > file.out

    Which one of the following is the result of the command listed above?

    1. It updates the date on all filenames listed in foo.bar or creates blank files.

    2. It lists all files in foo.bar to the file cat in the current directory. It then concatenates cat, pipes it to xargs, which interactively views each file to the stdout and appends touch to each line. It then writes the results to file.out

    3. It does not do anything.

    4. It reads the contents of foo.bar, updates the date of foo.bar, and outputs two copies of foo.bar in the file file.out.

    5. It reads foo.bar to a file named touch in the local directory.

Filesystem           1k-blocks      Used Available Use%
    Mounted on 
    /dev/hda1              1018298    428839    536848  44% / 
    /dev/hda6              3051748   2674311    219600  92%
    /dev/hda5              3780823   3488317     96917  97% /usr

    What command produces the output above?

    1. ls

    2. fs

    3. free

    4. df

    5. du

  17. command -U username -P password

    Based on the above, which one of the following explains why you should NOT enter a password on the command line for certain programs?

    1. Many programs do not clear their command line copy buffer between invocations, and the next person to run the program will default to the previous password.

    2. Many programs are subject to buffer overflow errors if passwords are entered on a command line.

    3. Other users on the system can see the command line arguments.

    4. Export regulations on encryption do not allow strong encryption to secure the passwords passed through the shell.

    5. There is no problem with using command line passwords.

  18. Many users prefer to use SSH rather than normal telnet. Why?

    1. It disables packet sniffers.

    2. It provides better logs.

    3. It allows for better communication.

    4. It encrypts the whole connection.

    5. It encrypts the password.