Add pseudo terminal to bash history


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Add pseudo terminal to bash history
# 1  
Old 07-13-2010
Add pseudo terminal to bash history

Hello,

Could you tell me if it is possible to add pseudo terminal name to the bash history?
I need to see from which terminal the command was issues. I found a variable HISTTIMEFORMAT that helps me to identify the time but cannot find similar thing for the pts number.

thanks,
Pavel.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Ssh port forwarding through a pseudo terminal

Here's a situation: I do all my work on a Mac. I have mysql installed on my mac. 1. There's a certain linux server 'server01' that provides access to another linux server 'server02' via a pseudo terminal So, to ssh into 'server02', I do this from my mac: ssh -t server01... (1 Reply)
Discussion started by: imperialguy
1 Replies

2. UNIX for Dummies Questions & Answers

Does DOS has a terminal or pseudo terminal?

I am wondering if the DOS console works like the unix terminal? (1 Reply)
Discussion started by: vistastar
1 Replies

3. Shell Programming and Scripting

Replicate history commands in multiple terminal

Hi, I am using putty client to connect to my remote Linux server box, and I am connecting through ssh. That system runs bash shell. So, if I use multiple putty terminal, how can I replicate those commands that I ran in other terminals to be available/shared in the current terminal window (i.e)... (1 Reply)
Discussion started by: royalibrahim
1 Replies

4. Shell Programming and Scripting

How to clear history logs of all terminal sessions

Hi, I would normally clear off the history entries from a terminal by using the following commands: > ~/.bash_history history -c But this will remove the entries of that particular session only. How to prune all the entries of all login sessions for a particular user in a system? N.B:... (3 Replies)
Discussion started by: royalibrahim
3 Replies

5. Programming

Pseudo-Terminal Programming-Extra newline

Hello everyone, im having a hard time figuring out why the program posted below prints an extra newline every time I type the enter key.I suspect this has to do with the terminal line discipline, but I can't really understand why.I have tried turning on/off several terminal options and disable... (0 Replies)
Discussion started by: rlex
0 Replies

6. UNIX for Dummies Questions & Answers

Pseudo Terminal

How can i view what my colleague is doing in the terminal pts/1 while i have logged into terminal pts/2 ?? Both have remotely logged in via ssh. (4 Replies)
Discussion started by: proactiveaditya
4 Replies

7. UNIX for Advanced & Expert Users

Pseudo-terminal will not be allocated because stdin is not a terminal.

I am trying to automate a SSH login using Keys using the following command ssh -i id_rsa usernamw@ipaddr. I am successful in doing this and i am getting the Warning Screen and I logon successfully. but when I am executing the command tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat ... (1 Reply)
Discussion started by: Shivdatta
1 Replies

8. UNIX for Advanced & Expert Users

How to create a pseudo terminal

i have been trying to write a program to create a pseudo terminal..but im not familiar with pseudo terminals..so could some one help me out with the program flow ?? (0 Replies)
Discussion started by: shoba
0 Replies

9. Shell Programming and Scripting

How to kill history from terminal to others using same id

I have a application ID and many users in the team are using this id. I dont want the people to check whati am running with the id from my terminal. is there a way to kill history get back from my console to everybody so thatwhat ever i type in my console cant be seen from other users who are... (5 Replies)
Discussion started by: dsravan
5 Replies

10. Solaris

pseudo: [ID 129642 kern.info] pseudo-device: vol0

Hi I have a system that gave me some messages on bootup that I was not used to seeing: pseudo: pseudo-device: vol0 genunix: vol0 is /pseudo/vol@0 these came with these: Feb 13 17:42:17 system1 eri: SUNW,eri0 : 100 Mbps full duplex link up Feb 13 17:42:21 system1sendmail: My unqualified... (0 Replies)
Discussion started by: mndavies
0 Replies
Login or Register to Ask a Question
grantpt(3C)						   Standard C Library Functions 					       grantpt(3C)

NAME
grantpt - grant access to the slave pseudo-terminal device SYNOPSIS
#include <stdlib.h> int grantpt(int fildes); DESCRIPTION
The grantpt() function changes the mode and ownership of the slave pseudo-terminal device associated with its master pseudo-terminal coun- terpart. fildes is the file descriptor returned from a successful open of the master pseudo-terminal device. The user ID of the slave is set to the real UID of the calling process and the group ID is set to a reserved group. The permission mode of the slave pseudo-terminal is set to readable and writable by the owner and writable by the group. RETURN VALUES
Upon successful completion, grantpt() returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ERRORS
The grantpt() function may fail if: EBADF The fildes argument is not a valid open file descriptor. EINVAL The fildes argument is not associated with a master pseudo-terminal device. EACCES The corresponding slave pseudo-terminal device could not be accessed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
open(2), ptsname(3C), unlockpt(3C), attributes(5), standards(5) STREAMS Programming Guide SunOS 5.11 14 Aug 2006 grantpt(3C)