Freebsd – find a log file that logs ports error messages in FreeBSD

bsd-portsfreebsd

I looked in /var/log/ but there isn't any log files that records ports log, and I just found this person asking the same thing in other forum and get an answer which stating there is no such file. If that's the case how should I read error messages? with more?

Best Answer

There's script(1) command which makes typescript of terminal session:

[spongebob@conductor ~]$ script session.log
Script started, output file is session.log
[spongebob@conductor ~]$ uname -r
7.1-RELEASE
[spongebob@conductor ~]$ cd /usr/ports
[spongebob@conductor /usr/ports]$ exit

Script done, output file is session.log

Then you can read the log:

[spongebob@conductor ~]$ cat session.log
Script started on Mon Jan 10 03:48:31 2011
[spongebob@conductor ~]$ uname -r
7.1-RELEASE
[spongebob@conductor ~]$ cd /usr/ports
[spongebob@conductor /usr/ports]$ exit

Script done on Mon Jan 10 03:48:44 2011
[spongebob@conductor ~]$

If you omit the argument file, then script saves all dialogue in the file typescript.

Hope that helps.

Related Question