LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-23-2005, 01:47 AM   #1
phoenix_fei
Member
 
Registered: Nov 2004
Location: shanghai
Distribution: worket
Posts: 41

Rep: Reputation: 15
top problem


In Linux,I use "int rc=system("top > ./list.txt")",then I find the file of list.txt
that is more and more,finally I watch that the file of list.txt was written to
many. Now I want it write only once ,how to deal with it ?
 
Old 02-23-2005, 01:53 AM   #2
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
hi,
I am not able to understand the question very clearly, but
If you want to take the top output only once, use "top -b -n 1"

HTH.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get problem - need top force remove an application amon Debian 4 10-22-2010 07:02 AM
Fluxbox slit positioning problem: always in top left beefsprocket Linux - Software 4 09-27-2004 10:35 AM
Problem with top rodrigo_la Linux - Security 1 05-24-2004 03:36 PM
Mouse stays in top left corner after Mandrak 9 Install could be problem with X Shorty Linux - Newbie 4 04-09-2003 10:06 PM
top problem minor Linux - General 2 08-02-2001 08:39 PM


All times are GMT -5. The time now is 05:36 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration