tools of the trade linux and sql coursera weekly challenge 3 answers
Test your knowledge: Navigate the Linux file system in Bash
1. What is a command?
- A common shell in many Linux distributions
- An instruction that tells a computer to do something
- The highest-level directory in Linux
- A component of the Linux architecture
3. What does the cd command do?
- Navigates between directories
- Outputs a specified string of text
- Displays the names of files in the current directory
- Prints the working directory to the screen
4. A security professional enters head access.txt into a shell. What are they telling the operating system to do?
- Remove the first 5 lines of access.txt
- Return the content of access.txt one page a time
- Display the first 10 lines of access.txt
- Add a header to the file named access.txt
5. What is the difference between an absolute file path and a relative file path?
- An absolute file path starts from the current directory, and a relative file path starts from the root.
- An absolute file path ends with a forward slash (/), and a relative file path ends with a backslash (\).
- An absolute file path starts from the root, and a relative file path starts from the current directory.
- An absolute file path ends with a backslash (\), and a relative file path ends with a forward slash (/).
Test your knowledge: Manage file content in Bash
6. What two arguments commonly follow the grep command?
- The file to move and the new file location
- The string to search for and the file to search through
- The file to write to and the string to add to it
- The file name to search for and the directory to search through
7. In Linux, what does the piping command (|) do?
- It searches a specified file and returns all lines in the file containing a specified string.
- It moves a file or directory to a new location.
- It sends the standard input of one command as standard output to another command for further processing.
- It sends the standard output of one command as standard input to another command for further processing.
8. A security professional enters cp vulnerabilities.txt /home/analyst/projects into the command line. What do they want the operating system to do?
- Create a new file named vulnerabilities.txt in the projects directory
- Remove the vulnerabilities.txt file from the projects directory
- Search for the string vulnerabilities.txt in the projects directory
- Copy the vulnerabilities.txt file into the projects directory
Shuffle Q/A 1
9. What command creates a new file called failed_logins.txt?
- find failed_logins.txt
- mkdir failed_logins.txt
- touch failed_logins.txt
- rm failed_logins.txt
Test your knowledge: Authenticate and authorize users
10. What is authorization?
- The concept of granting only the minimal access and authorization required to complete a task or function
- The concept of granting access to specific resources in a system
- The process of a user proving that they are who they say they are in the system
- The process of temporarily granting elevated permissions to specific users