1) Remove directory \'test\' by running command: rm -rf test, then run command:
ID: 3594828 • Letter: 1
Question
1) Remove directory 'test' by running command: rm -rf test, then run command: bash script2 7
What files are in directory 'test'?
a) afile1.txt afile3.txt afile5.txt afile7.txt
b) Directory 'test does not exist
c) afile0.txt afile1.txt afile2.txt afile3.txt afile4.txt afile5.txt afile6.txt
d) afile0.txt
2) Run script2 with command: bash script2
The output is:
a) err: number of files must be specified
b) err: number can not be larger than $maxn
c) Start running ...
d) system error: cannot creat dir test
3)Run script2 with command: bash script2 $(whoami)
The output is:
a) err: input must be a number
b) Start running ...
c) err: number of files must be specified
d) err: number can not be larger than 45
4) Run script with command: bash script1 $(whoami) The output is
a)Start running ...
b) User's name does not match
c) Not safe to run script1 as root
d) User's name must be specified
5) Run script2 with command: bash script2
The output is:
a) err: number can not be larger than $maxn
b) User's name must be specified
c) err: number of files must be specified
err: input must be a number
a) afile1.txt afile3.txt afile5.txt afile7.txt
b) Directory 'test does not exist
c) afile0.txt afile1.txt afile2.txt afile3.txt afile4.txt afile5.txt afile6.txt
d) afile0.txt
Explanation / Answer
1) Remove directory 'test' by running command: rm -rf test, then run command: bash script2 7
What files are in directory 'test'?
Ans: b) Directory 'test does not exist.
After performing rm command , there is no directory named testa nd it gives error.
2) Run script2 with command: bash script2
The output is:
Ans: a) err: number of files must be specified
As per syntax we need to specify number of files.
3)Run script2 with command: bash script2 $(whoami)
The output is:
Ans: b) Start running ...
4) Run script with command: bash script1 $(whoami) The output is
Ans:d) User's name must be specified
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.