131k views
2 votes
You are managing an FTP server installed in Ubuntu Server. The server has created a very large log le, vsftpd.log. Which command is appropriate to search the log le for activity of the user charlie?

a. sudo cat /var/log/vsftpd.log
b. grep "charlie" /var/log/vsftpd.log
c. sudo grep "charlie" /var/log/vsftpd.log
d. cat /var/log/vsftpd.log

1 Answer

3 votes

Answer:

c. sudo grep "charlie" /var/log/vsftpd.log

Step-by-step explanation:

  • sudo is used to access /var/log files since it requires superuser access
  • grep command is used to search for a string of characters in a specified file
  • "charlie" is the string searched in the log files
  • /var/log/ is where the log files are in linux systems
User Huonderv
by
5.6k points