21. What does the grep command do?

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

22. What does the touch command do?

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

23. What are read, write, and execute?

  • The three types of permissions for authorized users
  • The three types of owners for files and directories
  • Different methods for editing files
  • Specific Linux commands used to change file permissions

24. 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?

  • chmod u-w,g+r access.txt
  • chmod u+rw,g-rw access.txt
  • chmod access.txt u+w,g-r
  • chmod u+w,g-r access.txt

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

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

26. Which command can you use to change your current directory?

  • pwd
  • cat
  • ls
  • cd

27. What does the apropos command do?

  • Searches the manual page descriptions for a specified string
  • Displays detailed information on commands and their options
  • Prints the working directory to the screen
  • Displays a description of a command on a single line

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

  • Read
  • Use
  • Write
  • Execute

Shuffle Q/A 3

29. 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
  • Create a new file named updates.txt in the OS directory
  • Search through the updates.txt file and return all lines containing the string OS
  • Move the updates.txt file to the OS directory

30. What does sudo do?

  • Temporarily grants elevated permissions to specific users
  • Deletes users from the system
  • Changes the owner associated with a particular file
  • Adds users to the system

Leave a Reply