Workbook Questions 3.5 Flashcards
- Identify the Linux command used by root to give everyone full access permission to directory /public. [Select all that apply]
A. chmod 777 /public
B. chmod ugo=rwx /public
C. chmod a+rwx /public
D. chmod ugo+rwx /public
All of them
The user has set the umask to 022.
14. A file is created. What will be the file’s permission?
A. —-rw-rw-
B. -rw-r–r–
C. -rw-rw-rw-
D. —-r–r–
E. -rwxr-xr-x
B
The user has set the umask to 022.
15. A directory is created. What will be the directory’s permission?
A. d—rw-rw-
B. drw-r–r–
C. drw-rw-rw-
D. drwxr-xr-x
E. d—-w—w
D
- What umask should be set so the resultant file permission is -r–r–r–
A. 044
B. 033
C. 022
D. 011
E. 333
E
- Identify the correct umask to set the resultant file permission to -r–r–r–. Select two answers.
A. umask a-r
B. umask a=r
C. umask ugo=r
D. umask u-r
B, C
- The root user wants to change the owner to cfo and group to ExecCmt for file Strategy.Q03. Identify the command that will achieve the result.
A. chown cfo root Strategy.Q03
B. chown Strategy.Q03 cfo root
C. chgrp Strategy.Q03 cfo ExecCmt
D. chgrp cfo.ExecCmt Strategy.Q03
E. chown cfo.ExecCmt Strategy.Q03
E
- Select one correct statement. What is the outcome of changing the umask
A. umask will affect file permissions for all files that are created after the umask has changed, the files that were already created by the same user will also automatically change.
B. umask will change file permissions for all files that are created after the umask has changed, the files that were already created must be changed using chmod.
B
- fibbonaci.sh is a script which is user runs from the command prompt as $:fibbonaci.sh where $: is the prompt. Select one correct answer with reference to $PATH and the method of execution of the script.
A. Linux will search for the file in the $PATH variable, after the search is exhausted Linux will flag an error. If the file is found in the path, it will execute.
B. Linux like MSDOS will first search for the file in the current directory, if the file exists, it will run.
A
- Select one correct statement with reference to text files in DOS and Linux.
Linux terminates each line in a text file with a line feed (LF).
- Identify the echo statement that will display the current PID.
A. echo $?
B. echo $$
C. echo $#
D. echo $?
B
- Given the assignment
plant=orchid,
identify the output from echo $plant
A. orchid
B. plant
C. $plant
A
- Given the assignment
plant=orchid,
identify the output from echo ‘$plant’
A. ‘$plant’
B. plant
C. orchid
A
- Information about a file, a directory, the directory’s parent and each of its children is stored in a data structure
called
an inode
- Identify the command that will create a hardlink called box_office_hit for file movie.mp4.
A. ln box_office_hit movie.mp4
B. ln movie.mp4 box_office_hit
C. ln -s movie.mp4 box_office_hit
B
- Identify the link that has the same inode number as the file.
A. hard link
B. soft link
A