How to Capture a Unix Terminal Session?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Capture a Unix Terminal Session?
# 1  
Old 06-11-2012
MySQL How to Capture a Unix Terminal Session?

Hi All,

I want to capture all the operations performed in the terminal. So to achieve this I used “script” command. This works as I expected. But this command captures all the standard output which is redirected to terminal. For example if i “tail” a file, even the tail output is getting captured. But I want to capture only the commands not the output. I don't want to capture the Standard Output. Is there any way to capture only the commands that are typed in the terminal?



Thanks,
Kalai


# 2  
Old 06-11-2012
.bash_history ??? (assuming you're working on bash)
# 3  
Old 06-11-2012
We checked bash_history but it is not going to store the information of which TTY has done the operation.
I want to automate this process, when ever user login to the terminal the command needs to be stored in some log file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How are environment variables defined in a Gnome terminal session?

Hello... and thanks in advance for any help anyone can offer me with my question! I'm hoping someone will have a little patience with me and walk me through this! I'm trying to understand a user login process on Centos 7 and I've gotten a bit confused trying to figure out when/how a Gnome... (4 Replies)
Discussion started by: bodisha
4 Replies

2. AIX

[Solved] Find command hangs my terminal session

Hello every one. I know little to nothing about AIX. Recently I have been assigned to an AIX project. For some reason or another the find command is hanging the server. Well it does not hand server per say, it just freezes my terminal session. after running find, I waited up to 40 min and... (3 Replies)
Discussion started by: busi386
3 Replies

3. AIX

HMC login - Command line and terminal session

Hi Admins, Just a small question - Can we have multiple session for single user on HMC. e.g. Can I have a terminal session (via IE ) and command line (ssh) at same time ?? I am not sure whether it will impact HMC system or not. So want to make sure. let me know folks. Thanks (3 Replies)
Discussion started by: snchaudhari2
3 Replies

4. OS X (Apple)

Manipulate terminal session background color

Greetings, I know I can manipulate from AppleScript to terminal.app or just run commands from apple script. But what about from a BASH Script. when A user logs in and runs a maintenance utility I have written for them, I want to modify their background color and text color. example; ... (4 Replies)
Discussion started by: doctorfoo1
4 Replies

5. Cybersecurity

terminal capture

Hi Unix Experts, Since I am in childhood stage of Unix, I need to know a solution for the following: When I logon from a Remote terminal ( say /dev/pts/0) , I should be able to view the work done by the Remote user on the Unix machine when I log on as a root. eg : if the remote user types... (8 Replies)
Discussion started by: krishonv_2
8 Replies

6. Shell Programming and Scripting

Running a script without a terminal session

I'm trying to figure out how I can run a script "myScript.sh" in such a way that if my remote network connection gets disconnected, the script doesn't stop functioning. Right now I log in, run "./myScript.sh" and watch my output get pumped to a log file for about 10 hours. Only problem is that... (3 Replies)
Discussion started by: jjinno
3 Replies

7. UNIX for Dummies Questions & Answers

How to rename Xterm terminal in VNC session

Hi All, We are using VNC viewer to login to remote server. Remote server is running with Red Hat linux 3.0. Our problem is, we are unable to rename xterm terminal so is there any way we can rename? Thanks a lot in advance for your valuable inputs. Regards, Bachegowda (0 Replies)
Discussion started by: bache_gowda
0 Replies

8. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

9. UNIX for Advanced & Expert Users

terminal 8/ new Xwindows session

hi everyone... simple question,,, if I open a new Xwindows session on terminal 8 would it be possible to hook my laptop to a desktop computer platformed with linux and run an alternate session from the desktop on my laptop (on terminal 8 ) ......? is this impossible, impractical or too far... (1 Reply)
Discussion started by: moxxx68
1 Replies

10. UNIX for Dummies Questions & Answers

terminal capture

I have to capture a remote terminal from the Unix machine I tried with cat /dev/pts/0 (remote terminal) > /dev/tty1 (Unix terminal) but its is blocking the remote terminal. (2 Replies)
Discussion started by: krishonv_2
2 Replies
Login or Register to Ask a Question