View Single Post
Old 26th December 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 777
Default

I just wanted to add about 1000's of lines of text flying by when you do a package addition. Yes that can be a problem.

I know a couple of ways to deal with that if you think of it in time. First is to pipe the output of the command through tee(1). E.g.,

# pkg_add -v ... | tee mylogfile

Then you have a copy of standard output from the command in the log file (although standard error won't be there without further redirection). You can peruse this file at leisure for any install-time messages, etc.

The second way is to use the script(1) command. It basically starts a new shell and records everything you do in that shell to a file. When you're done exit the shell. By default the file that's recorded is called typescript. It will have some annoying characters in it like ^M that you may want to remove with an editor.

Of course, it's too late for those now since you already installed the packages, but all is not lost! pkg_add records what you installed under /var/db/pkg. Under there is a directory for each package you installed. In those sub-directories are various files, in particular there will be one called +DISPLAY if the package presented any message during install time. You can just read that file with the message in it.

$ find /var/db/pkg -name +DISPLAY

will show you what files may be there to look at.
Reply With Quote