Go Back on 101-500 Exam
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

101-500 Practice Test


Page 17 out of 49 Pages

Topic 3, GNU and Unix Commands

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?


A.

cat < myapp | cat > file1.log


B.

myapp 0>&1 | cat > file1.log


C.

myapp | cat > file1.log


D.

myapp | tee file1.log


E.

tee myapp file1.log





D.
  

myapp | tee file1.log



Which of the following shell redirections will write standard output and standard error output to a file named filename?


A.

2>&1 >filename


B.

>filename 2>&1


C.

1>&2>filename


D.

>>filename


E.

1&2>filename





B.
  

>filename 2>&1



Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)


A.

esc ZZ


B.

ctrl :w!


C.

esc zz


D.

esc :wq!


E.

ctrl XX





A.
  

esc ZZ



D.
  

esc :wq!



Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)


A.

uptime


B.

up


C.

top


D.

uname -u


E.

time –up





A.
  

uptime



C.
  

top



Which of the following commands will reduce all consecutive spaces down to a single space?


A.

tr '\s' ' ' < a.txt > b.txt


B.

tr -c ' ' < a.txt > b.txt


C.

tr -d ' ' < a.txt > b.txt


D.

tr -r ' ' '\n' < a.txt > b.txt


E.

tr -s ' ' < a.txt > b.txt





E.
  

tr -s ' ' < a.txt > b.txt




Page 17 out of 49 Pages
Previous