Top command

James Wilkinson fedora at aprilcottage.co.uk
Fri Aug 25 12:15:22 UTC 2006


Kaushal Shriyan wrote:
> I did top -b > testcheck and did ctrl-c I could see that its not refreshed
> 
> -rw-r--r--  1 root root 117K Aug 25 15:00 testcheck
> [root at e test]#
> 
> the size of the file testcheck doesnot increase

Yes, that's what you've been told. When you press Ctrl-C, you kill top,
and it stops adding anything to the testcheck file. Until you press
Ctrl-C, top keeps sending output to testcheck.

You may want to use the command
top -b > testcheck &
(the & is essential) which will put top "in the background" and return
control to the shell without killing top.

It would return a line something like
[1] 7665

Later on, you could run
kill 7665
to kill the job, or
fg 1
to return it to the foreground. (CAUTION: obviously, you should use the
numbers that the top ... & command returned!)

(Dapper is a version of the Ubuntu operating system. No-one was
suggesting that it would behave differently to Fedora in this regard).

Hope this helps,

James.
-- 
New address: james  | Legacy (adj):
@aprilcottage.co.uk | an uncomplimentary computer-industry epithet that means
                    | 'it works'.
                    |     -- Anthony DeBoer




More information about the fedora-list mailing list