Uah copy a file datal.txt to a directory Mydir? utal.txt Mydir/ b) ed datal.txt
ID: 3724518 • Letter: U
Question
Uah copy a file datal.txt to a directory Mydir? utal.txt Mydir/ b) ed datal.txt Mydir/ c) ep datal.txt Mydir/ d) Is datal.txt Mydir/ 10. Which of the following Linux command can move a file datal.txt to a directory Mydi r? a) mv datal.txt Mydir/ b) ed datal.txt Mydir/ c) ep datal.txt Mydir/ d) Is datal.txt Mydir/ a) ed CS405 b) rmdir CS405 c) rm CS405 d) mkdir CS405 12. Which Linux command can delete a file called hello.sh? a) vi hello.sh b) rm hello.sh c) Is hello.sh d) touch C$405 13. Which is the correct way to print out the 31d element in an array called Numbers? a) echo Numbers b) echo SNumbers c) echo Numbers 3] d) echo S(Numbers[3] 14. Which Linux command can display the usage (manual) of a command Is? a) man Is b) vi ls c) rm ls d) touch ls 15. Which Linux command can list all files and sub-directories inside a directory called CS40 a) ed CS405 b) Is CS405 c) rmdir CS405 d) mkdir CS405 16. Which is the correct statement to calculate the X'? Assume X-10. a) Y-S((x**4) b) Y-x*4 c) Y-4*x d) Y=SX*4Explanation / Answer
10.
Correct option: a. mv data1.txt Mydir/
Explanation: mv is a Unix command that moves one or more files or directories from one place to another. Hence this is the correct option. Other options are not correct as cd command is used to change the current working directory, cp command is used for copying files and directories, and ls is a command to list files.
11.
Correct option: c. rm CS405
Explanation: rm is a Unix command that removes both files and non-empty directories. Hence this is the correct option. Other options are not correct as cd command is used to change the current working directory, rmdir can only be used to remove an empty directory, and mkdir is used to make a new directory.
12.
Correct option: b. rm hello.sh
Explanation: rm is a Unix command that removes both files and non-empty directories. Hence this is the correct option. Other options are not correct as ls is a command to list files, vi is a screen-oriented text editor and touch command is used to create new, empty files and it is also used to change the timestamps on existing files and directories.
13.
Correct option: d. echo ${Numbers[3]}
Explanation: The syntax of printing an array element is echo ${array_name[index]}
14.
Correct option: a. man ls
Explanation: man stands for manual ;man ls will display the usage of ls command.
15.
Correct option: b. ls CS405
Explanation: ls command is used for listing directory contents
16.
Correct option: a. Y=$((X**4))
Explanation: ** is the exponentiation operator in shell script.
/*Hope this will help you. Thank you.*/
/*If this helps you, please let me know by giving a positive thumbs up. In case you have any queries, do let me know. I will revert back to you. Thank you!!*/
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.