Starkers
Starkers

Reputation: 10551

How can a view a live logfile with terminal?

Basically, mongodb (an open source sql-less database) logs its outputs in a log file known as var/log/mongodb.log

Is there anyway I can view this log file live in terminal without typing 'sudo nano' '^X' 'sud o nano' '^X' over and over again to refresh it?

Thanks kind strangers

Upvotes: 0

Views: 51

Answers (1)

Zombo
Zombo

Reputation: 1

tail -f /var/log/mongodb.log
 -f, --follow[={name|descriptor}]
                          output appended data as the file grows;
                          -f, --follow, and --follow=descriptor are
                          equivalent

tail(1)

Upvotes: 1

Related Questions