The current directory contains the following file:
-rw-r-r- 1 root exec 24551 Apr 2 12:36 test.sh
The file contains a valid shell script, but executing this file using./test.shleads to this error:
bash: ./test.sh: Permission denied
What should be done in order to successfully execute the script?
A. The file's extension should be changed from .shto.bin.
B. The user executing the script should be added to theexecgroup.
C. The SetUID bit should be set in the file's permissions
D. The script should be run using#!./test. shinstead of./test.sh.
E. The execute bit should be set in the file's permissions.
正解:E
解説: (Pass4Test メンバーにのみ表示されます)
質問 2:
FILL BLANK
What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)
正解:
for Explanation The keyword for is used in a shell script to begin a loop that iterates over a list of items or a range of numbers.
The syntax of the for loop is as follows:
for <var> in <list> do <commands> done
The variable <var> is assigned to each element of the <list> in turn, and the <commands> are executed for each iteration. The <list> can be a sequence of words, numbers, filenames, or other values. If the <list> is omitted, the for loop will iterate over the positional parameters ($1, $2, ...). The do and done keywords mark the beginning and the end of the loop body, respectively. The for loop is one of the three types of loops in shell scripting, along with the while and until loops. References: 1: Looping Statements |Shell Script - GeeksforGeeks 1 2: unix - Shell script "for" loop syntax - Stack Overflow 2 3: For Loop Shell Scripting - javatpoint 3
質問 3:
The ownership of the file doku.odt should be changed. The new owner is named tux. Which command accomplishes this change?
A. chmod u=tux doku.odt
B. newuser doku.odt tux
C. chown tux doku.odt
D. transfer tux: doku.odt
E. passwd doku.odt:tux
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
質問 4:
Which of the following outputs could stem from the commandlast?
A. root tty2 Wed May 17 21:11 - 21:11 (00:00)
B. EXT4-fs (dm-7): mounted filesystem with ordered data mode. Opts: (null)
C. Last login: Fri Mar 23 10:56:39 2018 from server.example.com
D. 1 ls
2 cat text.txt
3 logout
E. Password for user last changed at Sat Mar 31 16:38:57 EST 2018
正解:A
解説: (Pass4Test メンバーにのみ表示されます)
質問 5:
Which of the following programs is a graphical editor for vector graphics?
A. MySQL
B. NGINX
C. Samba
D. Python
E. Inkscape
正解:E
解説: (Pass4Test メンバーにのみ表示されます)
永作** -
重要なキーワードや解説も丁寧で基礎も含めてこれ010-160一冊で十分カバー出来ます。過去問を解くことを繰り返していれば問題なく010-160合格できると感じました。