Results 1 to 6 of 6
i want to save the output of top command so i did below
top >> fileA
it successfully writes the output but it overwrites the existing result. I want every ...
- 12-16-2009 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 63
top command save in a file
i want to save the output of top command so i did below
top >> fileA
it successfully writes the output but it overwrites the existing result. I want every new result will save but no overwrite
any help
thanks
- 12-16-2009 #2
Have you tried using it in batch mode with the -b option?
- 12-16-2009 #3Just Joined!
- Join Date
- Jun 2006
- Location
- Carlisle, MA
- Posts
- 13
How you are stopping the `top' command between runs?
Tom
- 12-17-2009 #4Just Joined!
- Join Date
- Mar 2008
- Posts
- 63
i am new in linux. i just want to save every new result of TOP in the file
- 12-17-2009 #5Just Joined!
- Join Date
- May 2006
- Posts
- 4
Use -b and -d option in top comamnd.
-b is for for sending output from top to other programs or to a file and -d is for delay time.
So for example, to save output of top command to top_output file in 2 seconds delay.
top -b -d 2 >>top_output
Also, use can use -n option to limit the number of iterations. Look at the man page of top for more option
- 12-17-2009 #6Just Joined!
- Join Date
- Mar 2008
- Posts
- 63
thanks. its working


Reply With Quote
