Re: Top command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux