Sponsored Content
Full Discussion: top command line utility
Top Forums Programming top command line utility Post 302146447 by cassj on Tuesday 20th of November 2007 02:25:58 PM
Old 11-20-2007
This worked for me to get a top snapshot (I'm running bash in Ubuntu 7.10):

top -b -n 1 > ~/Desktop/top.txt


I did a man top to find out that:

-b : Batch mode operation
Starts top in ’Batch mode’, which could be useful for sending output from top to other programs or
to a file. In this mode, top will not accept input and runs until the iterations limit you’ve set
with the ’-n’ command-line option or until killed.

-n : Number of iterations limit as: -n number
Specifies the maximum number of iterations, or frames, top should produce before ending.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i extract only the Memory line from top command ?

Hello all i need in csh to extract only the Memory line from the out put of the top command how can it easily done (1 Reply)
Discussion started by: umen
1 Replies

2. Programming

command line socket read utility

HI I have a messaging s/w daemon(TIBCO rvrd) provided by vendor which will accept connections from various clients and routes messages to the destinations. In order to route it internally uses two ports(one tcp adn one udp). I want to know on which port(tcp/udp) it is transmitting... (3 Replies)
Discussion started by: axes
3 Replies

3. Linux

The dot command-line utility?

Hi, What else is the dot used beside relative filepaths in bash? Is it a shell utility as well? No man entry for dot (.)... (3 Replies)
Discussion started by: varelg
3 Replies

4. UNIX Desktop Questions & Answers

How do you reverse terminal command line to the top?

Hi All, I work on a Linux platform which runs Red Hat (forget which version) and use both korn and bash shells. Is there a way of making the command line appear at the top of the terminal window and any lists, commands or directory names etc to appear below the top, that is to say reverse the... (1 Reply)
Discussion started by: ray_m
1 Replies

5. Shell Programming and Scripting

DB Access Command Line Utility

To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code. I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like: ... (3 Replies)
Discussion started by: furashgf
3 Replies

6. UNIX for Dummies Questions & Answers

FTP command-line utility usage

Hi, Using command-line utility "ftp or sftp", I want to transfer files across Windows and UNIX. Can you please tell me from where I need to connect to ftp and how do I specify the hostname, credentials and how do I get and put files between DOS and UNIX? Please provide me as much... (10 Replies)
Discussion started by: Dev_Dev
10 Replies

7. Shell Programming and Scripting

Top utility in bash for loop

Dear All, is it possible to use top utility in for loop? I am trying to get top swap space consuming processes in my for loop. I got multiple way (using /proc FS) however have anybody used top command in for loop? Using /proc FS giving solutionbut itrs more complex. Please suggest if... (4 Replies)
Discussion started by: mail2vivek1
4 Replies

8. Shell Programming and Scripting

Issue in running a command line utility in CRON

Hi Everyone! I am facing an issue in running a command line utility from the CRON. This utility displays IPC statistics on UNIX message queues: The "queue name" and the "count" of messages in the queue. When running this utility from prompt, it will provide an output on the screen, like the... (4 Replies)
Discussion started by: vai_sh
4 Replies
WRITE(1)						     Linux Programmer's Manual							  WRITE(1)

NAME
write - send a message to another user SYNOPSIS
write user [ttyname] DESCRIPTION
Write allows you to communicate with other users, by copying lines from your terminal to theirs. When you run the write command, the user you are writing to gets a message of the form: Message from yourname@yourhost on yourtty at hh:mm ... Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as well. When you are done, type an end-of-file or interrupt character. The other user will see the message EOF indicating that the conversation is over. You can prevent people (other than the super-user) from writing to you with the mesg(1) command. Some commands, for example nroff(1) and pr(1), may disallow writing automatically, so that your output isn't overwritten. If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the ter- minal name as the second operand to the write command. Alternatively, you can let write select one of the terminals - it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place. The traditional protocol for writing to someone is that the string `-o', either at the end of a line or on a line by itself, means that it's the other person's turn to talk. The string `oo' means that the person believes the conversation to be over. SEE ALSO
mesg(1), talk(1), who(1) HISTORY
A write command appeared in Version 6 AT&T UNIX. AVAILABILITY
The write command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. 12 March 1995 WRITE(1)
All times are GMT -4. The time now is 04:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy