CompTIA Study Materials
AWS Study Materials
AWS Certified Developer Associate AWS Certified Developer Associate
AWS Certified Developer Associate DVA-C02
AWS Certified Solutions Architect Associate AWS Certified Solutions Architect Associate
AWS Certified Solutions Architect Associate SAA-C03
AWS Cloud Practitioner AWS Cloud Practitioner
AWS Cloud Practitioner CLF-C02
Microsoft Study Materials
Microsoft Azure Fundamentals Microsoft Azure Fundamentals
Microsoft Azure Fundamentals AZ-900

Free CompTIA Linux+ XK0-005 Practice Question

A systems administrator needs to investigate an issue in a Docker container that is failing to start correctly. The administrator wishes to view the output logs to diagnose the problem. Which command should the administrator run to display the last 50 lines of logs from the container named 'web-app'?

  • docker container logs web-app --last 50

  • docker inspect --format='{{.LogPath}}' web-app

  • docker logs --tail 50 web-app

  • docker logs -f web-app | tail -50

This question is for objective:
Scripting, Containers, and Automation
Your Score:
Scripting, Containers, and Automation
System Management
Security
Troubleshooting
SAVE $45