Visit Our UNIX and Linux User Community


history file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers history file
# 1  
Old 09-10-2009
history file

how can we view the commands that are executed in the tty1 being in tty2SmilieSmilieSmilie

is there a way?
# 2  
Old 09-10-2009
ps -ef | grep <name of the tty>
Ps -ef command shows all the process (for all ttys). If you see only the process on tty4, you can
ps -ef | grep tty4

In my case my tty is pts/0 and I want to see the processes on pts/15
so ps -ef | grep pts/15
# 3  
Old 09-11-2009
history

hey yes it works but what if i have logged in tty1 & tty2 with the same user.....
i mean root in tty1 and again root in tty2
# 4  
Old 09-11-2009
It works for your case also.
# 5  
Old 09-11-2009
no i just get to see the process of the other terminals

---------- Post updated at 12:48 PM ---------- Previous update was at 12:44 PM ----------

let me make it more clear

In Virtual-Terminal 1 (tty1) and Virtual-Terminal 2 (tty2)
login with a account on both.
Type any command on tty1.

How can the commands run in tty1 be seen in tty2
# 6  
Old 09-11-2009
I have logged in to a same host in 2 different terminals. pts/1 and pts/0
On pts/1, I issued command 'top'
From pts/0, I issued command, ps -ef | grep pts/1
It showd me "top command is running there."
For you, i can paste my out put here

Code:
hnfgr1n7 /u/etp/pub/QSFDDB/Model 33$ ps -ef | grep pts/1
siba   2596  8212  1 03:43 pts/1    00:00:00 top
siba   2600 31232  0 03:43 pts/0    00:00:00 grep pts/1
siba   8212  8206  0 Sep07 pts/1    00:00:00 -ksh

# 7  
Old 09-14-2009
history

hey yes it works thanks alot.......SmilieSmilieSmilieSmilie
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #881
Difficulty: Medium
One many threat vectors to a modern SCADA system is the threat of unauthorized access to the control software,
True or False?

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies

2. UNIX for Advanced & Expert Users

Who has modified a file - History?

Hello, I'd want to know who and what time has modified a file in unix (history). I'd like to know all people who has modified a file. Thanks in advance (6 Replies)
Discussion started by: nurinolo
6 Replies

3. UNIX for Dummies Questions & Answers

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies

4. HP-UX

History file

Hi Experts, Need your help in understanding the configurations related to history file. I have few questions regarding this. (i) Where I can configure the file in which command history would be stored. On my hp-ux box, for one user history is stored in .history file whereas for... (3 Replies)
Discussion started by: sai_2507
3 Replies

5. UNIX for Advanced & Expert Users

History to Another file [local user history , but root access]

Hi all, My need is : 1. To know who , when , which command used. 2. Local user should not delete this information. I mean , with an example , i can say i have a user user1 i need to give all the following permissions to user1, : a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies

6. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

7. Shell Programming and Scripting

History file copy

Hi Gurus, I have written one profile validating script and it is called from profile file while loading. Now i would like to know how to capture commands executed by user on exit to one file . As to make simple, when i exit from su - oracle ,what all commands are written in .sh_history file... (2 Replies)
Discussion started by: oramnts
2 Replies

8. Shell Programming and Scripting

history of a file

Hi every one, Plz help me, what commands are helpful to know the complete history of a file in unix . like, ls -lrt will give the group & user created & time last accessed. I need to know particularly where that file come from like from which machine it is ftp'ed. Thanks. (1 Reply)
Discussion started by: pradeep_script
1 Replies

9. UNIX for Dummies Questions & Answers

history of a file

Hi, Is it possible to trace out the history of file in unix? iam using HP-Ux11,i have a file modified by some one with the common account.is it possible to get the IP or machine name of the user who modified this?how to trace out this? Thanks for help (2 Replies)
Discussion started by: sudhasudheer
2 Replies

10. Shell Programming and Scripting

File History

Hi all, A small help from u....... i just want to know is there any command to get the history of given file such as file creation date, next modified dates etc... Thank you Chanakya (2 Replies)
Discussion started by: Chanakya.m
2 Replies

Featured Tech Videos