Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am tailing a log file. How can I capture the output for one minute?

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted
tail -f mylogfile & sleep 60; kill $!
share|improve this answer
add comment

You fail to mention your OS, Shell or other pertinent infos. Therefore, I recommend entering your command and watching the clock for one minute, then sending the 'break' command.

The Cron command springs to mind to schedule tasks assuming you are running an Linux/UNIX box.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.