Sponsored Content
Full Discussion: read terminal command
Top Forums Programming read terminal command Post 302102042 by bssandilya on Monday 8th of January 2007 05:04:20 AM
Old 01-08-2007
chk this out

hi u can write a deamon proc in C to read all the command in the terminal.

use the "system" system call in the c program and redirect all the commands in the history to a file to analyse.writing a deamon allows u to do this in background.

system("history>test.$$);

include this in the code.

mail me if u have any concerns
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Terminal Hungup at the time of read

Hi, There are two scripts. The second script is called from the first one. These will create two processes on unix. In the second script, there is a read statement in the while loop. Under unexpected conditions, at the time of reading response from the user, if the terminal hungup happens,... (1 Reply)
Discussion started by: pkusumam
1 Replies

2. Shell Programming and Scripting

read from terminal

If I do: cat file | write user I can cat a file to a users terminal. My question is, how can this user read the input and cat it into a file? I tried the reverse: read | file or read > file etc. But it didn't work. (1 Reply)
Discussion started by: rein
1 Replies

3. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

4. UNIX for Dummies Questions & Answers

How to read lock terminal values in solaris

Hi all I am using sun solaris 5.8. I wanna know where the value stored if we lock/unlock the terminal and how i can read and use it to my script. I am helpless . So plzzzzzz... (0 Replies)
Discussion started by: pankajarora_12
0 Replies

5. Programming

How to read terminal attributes using ioctl()

I want to get the terminal attributes such as , terminal width terminal height current cursor position Can I use ioctl function. Please help me how to use this function to get these details.. If possible please explain with a sample code. I'm very new to UNIX progrmming.... Thanks... (1 Reply)
Discussion started by: Sreejesh.S
1 Replies

6. UNIX for Dummies Questions & Answers

read a .bin through terminal and output a checksum?

Hi all, Ive been given a .bin file that I want to do a checksum on to make sure that it is consistant with what I know should be the checksum. I have tried using md5sum but it spits out a 128 bit line rather than a 32 bit line, which is what I want. Can someone help set me off in the right... (7 Replies)
Discussion started by: TeamUSA
7 Replies

7. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

8. UNIX for Dummies Questions & Answers

read from terminal/keyboard > /dev/tty

Hi, I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this: ok=false while do echo " Enter r1 to reformat " > /dev/tty read choice case $choice in ) echo " bla bla bla " ;; done However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies

9. OS X (Apple)

Read and manage mail under Terminal

When opening Terminal window under Mac OS Lion, I have a message saying I've got mail . It seems to be somewhere close to ~/Library/Server/Mail/Data/spool/ but I ignore what command to be typed in order to read it and suppress it later once read. (1 Reply)
Discussion started by: shub22
1 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
sndrsyncd(1M)						  System Administration Commands					     sndrsyncd(1M)

NAME
sndrsyncd - Availability Suite Remote Mirror update resynchronization daemon SYNOPSIS
/usr/lib/sndrsyncd DESCRIPTION
The sndrsyncd daemon automates update resynchronization after a network or machine failure and invokes Point-in-Time Copy copies when needed to protect the data volumes being updated during a resynchronization. The daemon is notified by the kernel when a network link being used by Remote Mirror goes down and invokes the sndradm(1M) command with the -u option to resynchronize all Remote Mirror sets which have autosync switched on and are using the network link. See sndradm(1M) for details on how to configure autosync for a Remote Mirror set. The daemon is also notified when any Remote Mirror resynchronization starts or completes. The daemon takes Point-in-Time Copy snapshots, if configured in the Availability Suite configuration file. On a secondary server, the daemon checks if a file system is currently mounted on the secondary volume and informs the kernel not to allow the synchronization to start if the file system is currently mounted. EXIT STATUS
0 Daemon started successfully. >0 Daemon failed to start. FILES
/lib/svc/method/svc-rdcsyncd Shell script for starting sndrsyncd. /lib/svc/method/svc-rdc Shell script for stopping sndrsyncd. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWrdcr, SUNWrdcu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
iiadm(1M), sndradm(1M), sndrd(1M), svcadm(1M), ds.log(4), rdc.cf(4), attributes(5) NOTES
Do not manually stop the sndrsyncd deamon. If you need to manually stop sndrsyncd perform these steps. This stops both the sndrd and sndrsyncd daemons. # svcadm disable svc:/system/nws_rdc # svcadm disable svc:/system/nws_rdcsyncd Do not manually start or restart the sndrsyncd deamon. If you need to manually start sndrsyncd perform these steps. This starts both the sndrd and sndrsyncd daemons. # svcadm enable svc:/system/nws_rdc # svcadm enable svc:/system/nws_rdcsyncd See svcadm(1M) for additional information. SunOS 5.11 2 Oct 2007 sndrsyncd(1M)
All times are GMT -4. The time now is 11:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy