A. administrator is writing text in vi. Now the administrator wants to save their changes and exit. Which of the following sequence of inputs will accomplish this? (Select TWO).
A. esc ZZ
B. ctrl :w!
C. esc zz
D. esc :wq!
E. ctrl XX
While editing a file in vi, an administrator realizes that the wrong file is being changed. Which of the following vi command sequences will allow the administrator to quit without saving any changes?
In the command foo < bar | foobar, which of the following statements is correct?
A. The stdout from the command foobar is saved to the file foo.
B. The stdout from the command foo is saved to the file foobar.
C. The command foobar receives its stdin from the stderr of foo.
D. The command foobar receives its stdin from the stdout of foo.
E. The command bar receives its stdin from the contents of the file foobar.
Which of the following is the output when the below shell script executes? cat <<foobar Hello foobar foobar
A. The contents of the file foobar
C. No output but a file named foobar is created
D. Hello foobar
E. Hello foobar foobar
All of the following commands will execute the bash script /usr/local/bin/runme.sh EXCEPT:
A. source /usr/local/bin/runme.sh
B. . /usr/local/bin/runme.sh
C. /bin/bash /usr/local/bin/runme.sh
E. run /usr/local/bin/runme.sh
Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt?
A. tr ‘rn’ ” < userlist.txt > newlist.txt
B. tr -c ‘nr’ ” < newlist.txt > userlist.txt
C. tr -d ‘r’ < userlist.txt > newlist.txt
D. tr ‘r’ ‘n’ userlist.txt newlist.txt
E. tr -s ‘^M’ ‘^J’ userlist.txt newlist.txt
Bob accidentally created the subdirectory bobsdir in his home directory. He tried to remove the subdirectory with the command rmdir bobsfile only to receive the error, “No such file or directory.” . Which of the following commands will remove the directory?
A. rmdir ‘~bob/bobsdir’
B. rmdir “~bob/bobsdir”
C. rmdir ~bob/’bobsdir’
D. rmdir ~bob/bobsdir
E. rmdir ~bob/\bobsdir
QUESTION 38 CORRECT TEXT
A. administrator has issued the following command: grub-install –root-directory=/custom-grub /dev/sda In which directory will the new menu.lst file be found? (Provide the full directory path only without the filename).
Many people like the vi text editor but the default bash command line editor recognizes emacs keystrokes. Which of the following commands, entered into a bash initialization file, will have bash recognize vi keystrokes after login?
A. history -p vi
B. alias emacs=vi
D. set -o vi
E. unset emacs
Which of the following does the Filesystem Hierarchy Standard enable? (Select TWO).
A. Software to predict the location of installed files and directories.
B. Software to predict the ownership and access rights to files and directories.
C. Users to predict the location of installed files and directories.
D. Users to predict how the filesystem should be formatted according to need.