Workbook Questions 3.5 Flashcards

1
Q
  1. 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

A

All of them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. What umask should be set so the resultant file permission is -r–r–r–

A. 044
B. 033
C. 022
D. 011
E. 333

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. 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

A

B, C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. 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

A

E

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. 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.

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. 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

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Select one correct statement with reference to text files in DOS and Linux.
A

Linux terminates each line in a text file with a line feed (LF).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. Identify the echo statement that will display the current PID.
    A. echo $?
    B. echo $$
    C. echo $#
    D. echo $?
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Given the assignment
    plant=orchid,
    identify the output from echo $plant

A. orchid
B. plant
C. $plant

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Given the assignment
    plant=orchid,
    identify the output from echo ‘$plant’
    A. ‘$plant’
    B. plant
    C. orchid
A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Information about a file, a directory, the directory’s parent and each of its children is stored in a data structure
    called
A

an inode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. 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
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Identify the link that has the same inode number as the file.

A. hard link
B. soft link

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. After the underlying file is deleted, a softlink remains in place but becomes inactive.

A. True
B. False

A

A

17
Q
  1. A hard link cannot be created for a directory.

A. True
B. False

A

A

18
Q
  1. There can be either one hard link or one softlink for a file.

A. True
B. False

A

B

19
Q
  1. Soft links and hard links can be removed using the rm command.

A. True
B. False

A

A