04-01-2009
Perfect, thanks cfajohnson!
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all,
I need a help in unix. is there any command in unix similar to doskey in MS Dos. It taked pain to enter the big command again and again.. the up and down arrows do not bring the previous commands on the prompt. so pls let me know if there is any command to enable the doskey kind of... (4 Replies)
Discussion started by: halel
4 Replies
2. UNIX for Dummies Questions & Answers
On Linux I could use the `watch` command to loop a command X times. Is there a similar command on AIX? If not, is there a way to write a loop on the command line to do this?
Linux: watch -d -n 60 'db2 list applications show detail | grep Connect | wc -l'
AIX: ??? (2 Replies)
Discussion started by: djschmitt
2 Replies
3. Solaris
Hi Experts,,
Can you tell me "Is there any command in solaris that gives the output repeatedly for every x seconds" when used with other commands like ls,du,df,etc..Like prstat updates its output for every 5 seconds..
If i want to view how much of disk usage is going on a filesystem for every... (2 Replies)
Discussion started by: sdspawankumar
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Please help me out!
In the man pages they dont talk about any options that can be used to terminate a running 'watch' command. Do you know a way of terminating the command using an option?
Thanks (1 Reply)
Discussion started by: foxtron
1 Replies
5. HP-UX
watch is a common linux command that executes a program periodically, showing output fullscreen.
I couldn't find anything for hpux, so I created the following shell which the user is testing:
cat /usr/bin/watch
#!/bin/sh
while ; do
clear
echo "Command: $*"
date
echo ""
... (2 Replies)
Discussion started by: mr_manny
2 Replies
6. Shell Programming and Scripting
Hi ,
I just wondering if there is any command that works similar to the expect command. I'm trying to setup a korn shell script that goes to remote servers and executes a command likes :
su - username -c "script to execute "
but then it'll prompt for the password so if I can provide... (1 Reply)
Discussion started by: arizah
1 Replies
7. Linux
Hello guys,
Is there any command to check the all child processes of a process like `ptree`?
ptree is not working in Linux..
Regards,
Raghu (3 Replies)
Discussion started by: raghu.iv85
3 Replies
8. Shell Programming and Scripting
Hi
I want to write a script, help me to monitor command output.
This script like Linux "watch" command.
Below is my script:
# cat watch.sh
#!/bin/bash
while true
do
clear
echo "command: $*"
( $* )
sleep 2
done
Then I run this script below (2 Replies)
Discussion started by: nnnnnnine
2 Replies
9. Shell Programming and Scripting
so i have a very long script which i have to run. when i run this script, i want to monitor the the openssl commands it runs.
the way ive attempted to do this is:
watch -t -n 1 "(date '+TIME:%H:%M:%S' ; ps aux | egrep openssl | egrep -v grep)" 2>&1 | tee -a logfile
the above command is... (2 Replies)
Discussion started by: SkySmart
2 Replies
LEARN ABOUT FREEBSD
watch
WATCH(8) BSD System Manager's Manual WATCH(8)
NAME
watch -- snoop on another tty line
SYNOPSIS
watch [-cinotW] [-f snpdev] [tty]
DESCRIPTION
The watch utility allows the user to examine all data coming through a specified tty using the snp(4) device. If the snp(4) device is not
available, watch will attempt to load the module (snp). The watch utility writes to standard output.
The options are as follows:
-c Reconnect on close. If the tty observed by watch is closed, automatically reattach to the same tty. If this option is not speci-
fied, watch will request a new tty if running in interactive mode or exit if running without a controlling tty.
-f snpdev
If this option is specified, watch will use snpdev as the snp(4) device. Without this option, watch will attempt to find the next
available snp(4) device.
-i Force interactive mode. Interactive mode is a default if watch is started from a tty. If output is redirected to a file, interac-
tive mode can still be requested by specifying this option.
-n Disable the ability to switch the watched tty interactively. This disables both change requests made with <control-X> as well as
automatic prompting when the current tty is closed or overflows. In all cases where a prompt would be displayed, watch will exit.
The reconnect flags are unaffected by this option. When this flag is used, <control-X> is passed through to the terminal.
-o Reconnect on overflow. The behavior of watch if the observed tty overflows is similar to the behavior if the observed tty is closed.
For more info see snp(4).
-t Print the date and time when observation of a given tty is started.
-W Allow write access to observed tty.
tty Tty may be specified as a tty-style device, such as a pseudo tty device, a virtual console, or a serial line, etc. Names may be pre-
ceded by /dev/.
OPERATION
While running in interactive mode, all user input is discarded except for:
<control-G>
Exit watch.
<control-W>
Clear screen.
<control-X>
Change attached tty, unless this feature is disabled, in which case control-X is passed to the terminal as with other control charac-
ters.
SEE ALSO
pty(4), sio(4), snp(4), kldload(8)
HISTORY
The watch utility first appeared in FreeBSD 2.1.
AUTHORS
Ugen J.S. Antsilevich <ugen@NetVision.net.il>
BUGS
No terminal emulation is performed. All user output is reproduced as-is.
BSD
November 24, 2001 BSD