5

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?

1 Answer 1

2

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.

1
  • wow I didn't know such a convenient command exists! Many thanks!!
    – user3927
    Jan 19, 2011 at 8:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .