Module 3-04 Challenge Flashcards

1
Q

What are the arguments in “ mv Q1users.txt /home/analyst/reports “? Select two answers.

1) Q1users.txt
2) /home/analyst/reports
3) .txt
4) mv

A

1) Q1users.txt
2) /home/analyst/reports

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

Which of the following items represents the root directory?

1) /
2) *
3) *home
4) /home

A

/

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

A security analyst enters “ grep OS updates.txt “ into the command line. What does this tell the operating system to do?

  • Create a new directory named OS and a new file named “ updates.txt “
  • Search through the updates.txt file and return all lines containing the string OS
  • Move the “ updates.txt “ file to the OS directory
  • Create a new file named “ updates.txt “ in the OS directory
A

Search through the “ updates.txt “ file and return all lines containing the string OS

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

Which of these commands creates a new file?

1) touch
2) mkdir
3) cd
4) chmod

A

touch

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

Which of the following are types of permissions? Select all that apply.

  • Execute
  • Authorize
  • Read
  • Write
A
  • Execute
  • Read
  • Write
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A security analyst enters “ chmod u+w,g-r access.txt “ into the command line. What does this command tell the operating system to do? Select all that apply.

  • Remove read permissions from the group for the “ access.txt “ file
  • Add write permissions to the group for the “ access.txt “ file
  • Add write permissions to the user for the “ access.txt “ file
  • Remove read permissions from the user for the “ access.txt “ file
A
  • Remove read permissions from the group for the “ access.txt “ file
  • Add write permissions to the user for the “ access.txt “ file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A user is not a root user, but needs elevated privileges to use certain commands. What should they do?

  • Use the “ chmod “ command
  • Assign themselves execute permissions
  • Assign themselves write permissions
  • Use the “ sudo “ command
A

Use the “ sudo “ command

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

What should you specify in the argument following the cd command?

  • The string you want to search for
  • Your current directory
  • The directory you want to navigate to
  • The file you want to create
A

The directory you want to navigate to

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

Which of the following commands searches the manual page descriptions for a specified string?

1) apropos
2) cp
3) man
4) pwd

A

apropos

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

Given the following permissions “ drw-rw-r– “, what does the fourth character represent?

  • The user has execute permissions for this directory
  • The owner does not have execute permissions for this directory
  • The group has execute permissions for this directory
  • The group does not have execute permissions for this directory
A
  • The owner does not have execute permissions for this
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Fill in the blank: The highest-level directory in Linux is called the _____.

  • root directory
  • home directory
  • sudo
  • permissions
A

root directory

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

What does the “ grep “ command do?

  • Prints the working directory to the screen
  • Searches a specified file and returns all lines in the file * containing a specified string
  • Creates a new directory
  • Temporarily grants elevated permissions to specific users
A

Searches a specified file and returns all lines in the file * containing a specified string

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

What does the “ touch “ command do?

  • Creates a new file
  • Opens a file editor
  • Changes permissions on files and directories
  • Moves a file or directory to a new location
A

Creates a new file

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

What are the three types of permissions?

  • Root, user, and group
  • Read, write, and save
  • User, group, and other
  • Read, write, and execute
A

Read, write, and execute

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

Which command can you use to change your current directory?

1) cat
2) ls
3) cd
4) pwd

A

cd

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

What are the arguments in “ cp vulnerabilities.txt /home/analyst/projects “? Select two answers.

1) /home
2) vulnerabilities.txt
3) /home/analyst/projects
4) cp

A

2) vulnerabilities.txt
3) /home/analyst/projects

17
Q

A security analyst is updating permissions on the file “ access.txt “. They want to add write permissions for the user and remove read permissions for the group. What do they enter on the command line?

1) chmod u-w,g+r access.txt
2) chmod u+w,g-r access.txt
3) chmod access.txt u+w,g-r
4) chmod u+rw,g-rw access.txt

A

2) chmod u+w,g-r access.txt

18
Q

In which of these situations would you enter “ cd logs “?

  • You want to search for the string logs in the files of your current directory.
  • You want to change to a subdirectory of your current directory named logs.
  • You want to print the first 10 lines of the logs file.
  • You want to list all the files and directories in the logs directory.
A

You want to change to a subdirectory of your current directory named logs.

19
Q

Given the following permissions “ drw-rw-r– “, what permissions does the group have? Select all that apply.

  • Read
  • Write
  • Execute
  • Use
A
  • Read
  • Write