1752798 Members
6021 Online
108789 Solutions
New Discussion юеВ

Capture Top Output

 
Allanm
Super Advisor

Capture Top Output

How do I capture top command output in a file. I want the output to be appended and not overwritten.

Thanks,
allan
2 REPLIES 2
Allanm
Super Advisor

Re: Capture Top Output

nevermind I figured out -

top -b |tee file.out

OR

top -b >> file.out
Viktor Balogh
Honored Contributor

Re: Capture Top Output

there is also a '-f' switch:

"-f filename Output is appended to filename. When -f is used, top defaults to 1 for -d and 16 for -n."
****
Unix operates with beer.