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

link|improve this question
feedback

2 Answers

up vote 4 down vote accepted
tail -f mylogfile & sleep 60; kill $!
link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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