Q. Indicate the right option to search for BOB, Bob, BOb or BoB?

  • (A) grep -v ‘Bob’ files
  • (B) grep ‘[BOB]’ files
  • (C) grep ‘B[oO][bB]’ files
  • (D) grep –i Bob files
πŸ’¬ Discuss
βœ… Correct Answer: (C) grep ‘B[oO][bB]’ files

Q. Indicate the right option to search for anything not a letter or number

  • (A) grep ‘^[a-zA-Z0-9]’
  • (B) grep ‘[^a-zA-Z0-9]’
  • (C) grep ‘[a-zA-Z0-9]’
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) grep ‘[^a-zA-Z0-9]’

Q. Which command will you use to see the available routes?

  • (A) show route
  • (B) route status
  • (C) netstat -r
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) netstat -r

Q. The permission -rwxr-xr-t represented in octal expression will be

  • (A) 2754
  • (B) 1754
  • (C) 1755
  • (D) 0777
πŸ’¬ Discuss
βœ… Correct Answer: (C) 1755

Q. With a umask value of 112, what is the default permission assigned to newly created regular file?

  • (A) -rw-rw-r–
  • (B) -r-xr-x-r–
  • (C) -rw-rw-r–
  • (D) —x–x-wx
πŸ’¬ Discuss
βœ… Correct Answer: (A) -rw-rw-r–

Q. Given the command $ chmod o-w datafile

  • (A) clears write permission to others for datafile
  • (B) clears write permission to everyone for datafile
  • (C) sets write permission to others for datafile
  • (D) sets write permission to everyone for datafile
πŸ’¬ Discuss
βœ… Correct Answer: (A) clears write permission to others for datafile

Q. Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?

  • (A) chmod rw r nil textfile
  • (B) chmod 310 textfile
  • (C) chmod 640 textfile
  • (D) chmod 046 textfile
πŸ’¬ Discuss
βœ… Correct Answer: (C) chmod 640 textfile

Q. If you are a root user, how can you grand execute permission only for the owner of the file project1?

  • (A) chmod U+X project1
  • (B) chmod a+x project1
  • (C) chmod u+x project1
  • (D) chmod +x project1
πŸ’¬ Discuss
βœ… Correct Answer: (C) chmod u+x project1

Q. A user executes the following command successfully: $ chmod +x file1.txt Which of the following is true of the output of this command?

  • (A) The command results in adding execute permission for all users (i.e., user,group & others)
  • (B) The command results in an error since the file is not an executable file
  • (C) The command results in adding execute permission for the owner of the file
  • (D) The command results in adding execute permission to the user who ran this command
πŸ’¬ Discuss
βœ… Correct Answer: (A) The command results in adding execute permission for all users (i.e., user,group & others)

Q. What does chmod +t do?

  • (A) set the sticky bit
  • (B) set effective groupid for filename
  • (C) set effective userid for filename
  • (D) wrong syntax
πŸ’¬ Discuss
βœ… Correct Answer: (A) set the sticky bit