Click Here to take the test. (You need an account. It's free)

 

1. What command is used to bring a command to foreground Processing after it has been backgrounded with an &?

  • bg
  • fore
  • 4g
  • fg

2. Which of the following commands will print various information about the kernel and architecture, along with other details?

  • info -sys
  • man sys
  • sysinfo
  • uname -a

3. Which of the following commands searches each user’s .bash_history file to determine whether the user has invoked the sudo command?

  • find /home -name "bash_history" | grep sudo
  • find /home -name ".bash_history" | xargs grep sudo
  • find /home/.bash_history | xargs grep sudo
  • find /home -type history | xargs grep sudo

4. Which of the following pagers includes the ability to search backward and forward as well as move backward and forward, line-by-line, and page-by-page?

  • more
  • back
  • less
  • catch

5. Assume that you re using the Bash shell and want to prevent output redirects from accidentally overwriting existing files. Which command and option can be used to invoke this behavior?

  • setoutput -f
  • overwrite=no
  • overwrite -n
  • set -C

6. Which option to the bunzip2 command sends output to STDOUT, much like the bzcat command?

  • -s
  • -o
  • -c
  • -d

7. Which of the following commands will display the last 50 lines of your command history when using Bash, including commands from the current session?

  • bashhist 50
  • history 50
  • cat .bash_history
  • tail -f .bash_history

8. Which command is used to send contents of a bzip2 archive toSTDOUT?

  • bzout
  • bzcat
  • bz2cat
  • bz2echo

9. When using Bash, how would you execute the last command starting with a certain string, even if that command was not the last one that you typed?

  • Precede the command with ! and then the string to search for.
  • Search for the command in history.
  • Precede the command with a ? and then the string to search for.
  • This is not possible with Bash.

10. Which of the following regular expressions would find the pattern steve or steve in a file when used with grep?

  • '[sS]teve'
  • '[S]*teve'
  • '^[Ss]teve'
  • '[$Steve]'

11. Which command will find directories with names beginning with 2014 located beneath the current directory?

  • find ./ -name "2014"
  • find ./ -type d -name "2014"
  • find / -type d "2014"
  • find ./ -type d -name "2014*"

12. Which signal is used by default by the pkill command?

  • SIGKILL
  • SIGTERM
  • SIGHUP
  • SIGKS

13. You need to run a command periodically and examine its output in real time. Which of the following commands enables this scenario?

  • mon
  • procmon
  • pgrep
  • watch

14. Users are reporting that various programs are crashing on the server. By examining logs, you see that certain processes are reporting out-of-memory conditions. Which command can you use to see the overall memory usage, including available swap space?

  • tree
  • pgrep
  • uptime
  • free

15. You have several files that need to be combined, with a line from each file being appended onto a single line. Which command can be used for this purpose?

  • paste
  • comb
  • appfile
  • combo

16. Which option to both mv and cp will cause the command to prompt before overwriting files that already exist?

  • -f
  • -z
  • -r
  • -i

17. Which option to the cp command will copy directories in a recursive manner?

  • -v
  • -R
  • -z
  • -i

18. You need to remove a single file from a directory if it exists but would like to be prompted for confirmation before doing so. Which option to the rm command causes the command to prompt for confirmation?

  • -a
  • -e
  • -i
  • -o

19. What is the default delimiter used by the cut command?

  • Colon
  • Tab
  • Space
  • Comma

20. When working in the Bash shell, you need to redirect both STDOUT and STDERR. Which of the following commands will redirect both STDOUT and STDERR?

  • 1>2
  • >2
  • 2>&1
  • >>

21. Assume that you have a file called zips.txt that contains several postai ZIP codes and you need to determine how many unique ZIP codes there are in the file. Which of the following commands can be used for that purpose?

  • sort zips.txt | uniq -c
  • uniq zips.txt
  • count zips.txt
  • cat zips.txt | uniq -c

22. Which of the following will unzip and extract the contents of a file that has been tarred and gzipped?

  • tar -zxf <file.tgz>
  • tar -xf <file.tgz>
  • tar -vz <file.tgz>
  • tar -fd <file.tgz>

23. You would like to tail a log file to watch entries as they are being added to the log file. In addition, you would also like to work within the same terminal window or SSH (Secure Shell) session to add entries to another file at the same time. Which command can be used to create two sessions within the same terminal window?

  • screen
  • tmux
  • sess
  • termse

24. Which options to is will produce output, including hidden (dot) files, in a list that is ordered such that the newest files are at the end of the output?

  • -la
  • -lat
  • -latr
  • -itr

25. Which type of quotes are used so that variables are interpolated within a Bash shell script?

  • Escaped quotes
  • Single quotes
  • Double quotes
  • Side quotes

26. Which option for the wc command prints the number of lines given as input?

  • -f
  • -a
  • -l
  • -o

27. The current hierarchy on the server contains a directory called /usr/local. You need to create additional directories below that are called /usr/local/test/october. Which command will accomplish this task?

  • mkdir -p /usr/local/test/october
  • mkdir /usr/local/test/october
  • mkdir -r /usr/local/test/october
  • mkdir -f /usr/local/test/october

28. You’re working with a large file in Vi and need to search for instances of a string earlier in the file. Which key will search backward in the file?

  • /
  • h
  • ?
  • x

29. Which command can be used to kill all processes by using their name?

  • killproc
  • killname
  • killall
  • kill -f

30. Which environment variable is used to control the default text editor used on a Linux system?

  • EDITOR
  • EDIT
  • TEXTEDITOR
  • DEFAULT_EDITOR

31. Which of the following egrep commands will examine /etc/passwd to find users who are using either /bin/bash or /usr/bin/zsh for their shell environment?

  • grep sh /etc/passwd
  • egrep '/*/.sh$' /etc/passwd
  • grep '/*/.=sh$' /etc/passwd
  • egrep '/*/..?sh$' /etc/passwd

32. Which command is used in order to decompress a file that has been compressed with xz?

  • unxz
  • dexz
  • xzu
  • u2xz

33. Which of the following commands uses 128-bit message digests?

  • sha256sum
  • sha512sum
  • sh128sum
  • md5sum

34. What will be the result if the touch command is executed on a file that already exists?

  • The access time stamp of the file will change to the current time when the touch command was executed
  • The file will be overwritten.
  • There will be no change.
  • The file will be appended to

35. You have been asked to create a compressed file that will be readable by those with other operating systems. Which tool can you use for this purpose?

  • gzip
  • bzip2
  • xz
  • tar

36. Which of the following commands shows the currently running processes and their resource usage in real time, updated every few seconds?

  • nice
  • ps
  • top
  • procs

37. You have backgrounded several tasks using &. Which command can be used to view the current list of running tasks that have been backgrounded?

  • procs
  • plist
  • jobs
  • free

38. Which command prints your current directory?

  • cwd
  • dir
  • cd
  • pwd

39. You are attempting to use rmdir to remove a directory, but there are still multiple files and other directories contained within it. Assuming that you’re sure you want to remove the directory and all of its contents, what is the command and arguments to remove the directory and all of its contents?

  • rm -f
  • rm -rf
  • rmdir -a
  • rmdir -m

40. What is the default number of lines printed by the head and tail commands, respectively?

  • 10 for head, 5 for tail
  • 5 for head, 10 for tail
  • 10 for both head and tail
  • 3 for both head and tail

41. Which of the following command lines would monitor a single process called nagios in a continuous manner?

  • top -n 1
  • top -p 23
  • ps -nagios
  • top -p 'pidof nagios'

42. Which find command will locate files within the current directory that have been modified within the last 24 hours?

  • find ./ -type f -mtime 0
  • find ./ -type f -mtime 24
  • find ./ -type f -mtime +1
  • find ./ type -f time 24

43. Which option to cpio lists the files as it is operating on them?

  • -l
  • -v
  • -k
  • -s

44. Which command will create an image of the /dev/sdai disk partition and place that image into a file called output. img?

  • dd if=sda of=/dev/sda1
  • dd if=output.img of=/dev/sda1
  • dd if=/dev/sda1 of=output.img
  • echo /dev/sda1 > output.img

45. You need to kill several processes at once. Rather than writing a complex ps-based command to do so, you can use which other command?

  • pkill
  • psk
  • pskill
  • prock

46. You have received a file that does not have a file extension. Which command can you run to help determine what type of file it might be?

  • grep
  • telnet
  • file
  • export

47. You need to run a command that is not inside your current path. Which of the following represents the typical method for doing so?

  • Use a fully qualified path for the command.
  • Set the PATH environment variable to include the correct path.
  • Restart the shell environment.
  • Restart the computer for settings to take effect.

48. Which of the following commands reprioritizes an already running process?

  • nice
  • renice
  • chnice
  • altnice

49. Which option to sha256sum causes the file to be read in binary mode?

  • -i
  • -b
  • -c
  • -p

50. You need to write a script that gathers all of the process IDs for all instances of Apache running on the system. Which of the following commands will accomplish this task?

  • ps auwx | grep apache
  • pgrep apache
  • processlist apache
  • Is -p apache

51. You need to declare a local environment variable that will then be available to child processes. Which of the following commands accomplishes this task?

  • ex
  • echo
  • dec
  • export

52. You are debugging a configuration file and the daemon indicates there is a problem on line 932. Which of the following commands will prepend line numbers onto the file?

  • lines
  • wc -l
  • newline
  • nl

53. Which command is used to access documentation on the Linux computer for a given command?

  • doc
  • heredoc
  • man
  • manual

54. When editing with Vi, which command changes to insert mode and opens a new line below the current cursor location?

  • f
  • a
  • o
  • i

55. You need to start a process that cannot be sent or will not accept aSIGHUP signal. Which command should be used to start theprocess?

  • nosig
  • nohup
  • nokill
  • noproc

56. You receive a file with an . lzma extension. Which command can you use to decompress this file?

  • xz
  • lz
  • gz
  • bzip

57. You need to cut or remove eight lines from a file while editing with Vi. Which combination should be used for this purpose?

  • d7
  • d8
  • r8
  • x7

58. You have downloaded a file with a . gz extension. What is the most likely command that you will use to decompress this file?

  • unz
  • gunzip
  • hunzip
  • gzunzip

59. You cannot find the man page of a command but you know the command exists. For example, the alias command exists but there is no man page for it. Which of the following commands could you execute to determine what type of command alias is?

  • type
  • cmd
  • uses
  • listr

60. Which of the following commands will send the contents of /etc/passwd to both STDOUT and to a file called passwordfile?

  • cat /etc/passwd > passwordfile
  • var /etc/passwd | passwordfile
  • cat /etc/passwd | tee passwordfile
  • echo /etc/passwd | stdout > passwordfile

61. You need to match files that begin with 201, as in 2017, 2018, 2019. Which of the following wildcard specifications can be used?

  • 201?
  • 201$
  • 201@
  • 201]

62. Which kill signal can be sent in order to restart a process?

  • -HUP
  • -RESTART
  • -9
  • -SIG

63. You need to examine the seventh section of the manual page for regular expressions, or regex, on a Linux system. Which command displays the seventh section of the manual?

  • man regex -7
  • man regex 7
  • man -page 7 regex
  • man 7 regex

64. You have attempted to stop a process using its service command and also using the kill command. Which signal can be sent to the process using the kill command in order to force the process to end?

  • -15
  • -f
  • -9
  • -stop

65. You need to break a large file into smaller pieces. Which command can be used for this purpose?

  • cut
  • split
  • dice
  • rem

66. Which command will watch the Apache log at /var/log/httpd/access. log and continually scroll as new log entries are created?

  • watch /var/log/httpd/access.log
  • tail /var/log/httpd/access.log
  • tail -f /var/log/httpd/access.log
  • mon /var/log/httpd/access.log

67. Which command will move all files with a .txt extension to the /tmp directory?

  • mv txt* tmp
  • move *txt /temp
  • mv *.txt /tmp
  • mv *.txt tmp

68. When examining the output from top, you see that a process has a value in the PR column of 20. To what does the PR column refer?

  • The process ID
  • The process utilization
  • The process priority
  • The processor core on which the process is executing

69. You are attempting to find more information about the jobscommand; however, an Internet search was not particularlyhelpful because there are so many Linux-related jobs available.Additionally, you attempted to view the man page for the jobscommand but it was not available. Which man page should you use to view more information on jobs?

  • jbs
  • procctl
  • bash
  • ps

70. Which command can be used to determine the current load average along with information on the amount of time since the last boot of the system?

  • uptime
  • sysinfo
  • bash
  • Is -u

71. When operating in command mode, which keys enable you to move the cursor in the Vi editor?

  • a, s, d, f
  • h, j, k, l
  • q, w, e, r
  • z, x, c, v

72. Which of the following commands will provide the usernames in a sorted list gathered from the /etc/passwd file?

  • cat /etc/passwd | awk -F : '{print $1}' | sort
  • sort /etc/passwd | cut
  • echo /etc/passwd
  • cat /etc/passwd | awk '{print $1}' | sort

73. The fgrep command is equivalent to running the grep command with which option?

  • -f
  • -F
  • -a
  • -E

74. You need to determine the exact command that will be run based on your current environment settings. Which command is used for this purpose?

  • what
  • which
  • find
  • Is

75. You are creating a Bash shell script and need to output the current script name to the current terminal. Which of the following commands accomplishes this task?

  • cat <CMD>
  • echo $0
  • echo $SCRIPT
  • echo $PS1

76. Which command can be run to determine the default priority for processes spawned by the current user?

  • prio
  • nice
  • renice
  • defpriority

77. What option is used to change the number of lines of output for the head and tail commands?

  • -l
  • -f
  • -g
  • -n

78. You need to start a long-running process that requires a terminal and foreground processing. However, you cannot leave your terminal window open due to security restrictions. Which command will enable you to start the process and return at a later time to continue the session?

  • fg
  • bg
  • kill
  • screen

79. You are using pgrep to find the process IDs for a given command. However, several other commands seem to also appear. Which option to pgrep enables matching against the full path of the process?

  • -f
  • -d
  • -o
  • -i

80. What command can be used to view the current settings for your environment when using Bash?

  • environment
  • env
  • listenv
  • echoenv

81. When using sed for a substitution operation, which option must be included so that the substitution applies to the entire line rather than just the first instance?

  • g
  • a
  • r
  • y

82. You are working with the j obs built-in command to display jobs. You would like to see only running jobs. Which option to the jobs built-in command will display only running jobs?

  • -s
  • -a
  • -l
  • -r

83. You have a specialized need for outputting a file in octal format. Which command or series of commands can be used for this purpose?

  • oct
  • cat <file> | octalf
  • od
  • octf

84. You need to determine files that are sized above 1GB. Which of thefollowing commands accomplishes this task?

  • find / -size +1G
  • find / -size 10000M
  • find / +1M
  • find / -size +1B

85. You are using the Vi editor for changing a file and need to exit. You receive a notice indicating "No write since last change". Assuming you want to save your work, which of the following commands will save your work and exit Vi?

  • :wq
  • :q!
  • dd
  • x

86. An environment variable has been set on login, but you need to remove that variable temporarily for the current session. Which shell built-in command can be used for this purpose?

  • reset
  • unset
  • undo
  • clear

87. Which options to xz are functionally equivalent to the xzcat program?

  • decompress and output
  • output and format
  • decompress and stdout
  • stdout and format

88. Which option to the man command accesses a different level of documentation, for example, system call documentation?

  • man 2 <argument>
  • progman <argument>
  • man -sys <argument>
  • man -list sys

 

{jssocials}