I'm using ROR on a Ubuntu server. I remember the first time I start ROR use rails s, I can see all logs, server status in the window
Now I start it as background function. When I need to check the log, I need to open WinSCP, find development log the huge file and open it. The time for downloading the file takes minutes.
Actually I dun need to see all log, I need only view last say 10-20 lines.
How can I do that?View last 10-20 development log without influence the ROR server.
This should work (assuming that you're already in your Rails project's main directory):
tail -f -n=20 log/development.log
Also, this command is outputting new lines continuously as they appear in log (because of modifier -f
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.