Sponsored Content
Top Forums UNIX for Advanced & Expert Users Getting the process ID of the terminal in Unix/Linux Post 302639777 by gauravsharma29 on Sunday 13th of May 2012 06:32:49 AM
Old 05-13-2012
Code:
[~]# ps
  PID TTY          TIME CMD
 7075 pts/1    00:00:00 bash


Last edited by Scrutinizer; 05-13-2012 at 07:59 AM.. Reason: code tags
This User Gave Thanks to gauravsharma29 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

connecting to unix through hyper terminal - as a dumb terminal

I just changed from windows NT to XP and I am no longer able to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies

2. Shell Programming and Scripting

Start process in shellscript at other terminal

A programming running in tty0 crashes. In a second terminal I kill all the processes. Can i start the program again from this terminal? Yes, I can, but it starts in tty1, and when i close the terminal, the program closes. Now I want to start the program from tty1 in tty0, so i can close... (4 Replies)
Discussion started by: benschell
4 Replies

3. UNIX for Dummies Questions & Answers

upper limit of accessible memory space for a single process in Unix/Linux

Hellp all, if there is 3G memory in my Unix server I want to know if all the 3G space can be used by ong sigle process. As i know, in Windows, one process can only access at most 1G memory despite there is probably more than 1G memory is equipped. (1 Reply)
Discussion started by: cy163
1 Replies

4. UNIX for Advanced & Expert Users

how to run a process after closing the terminal

i want to execute a shell script even if the terminal is closed. how to do? (3 Replies)
Discussion started by: lakshmananindia
3 Replies

5. UNIX for Advanced & Expert Users

Control process from different terminal (over SSH)

I pressed CTRL Z and suspended the job. then I pressed bg, The process re-started to throw output on the terminal and its not allowing me to access the prompt. its not even accepting CTRL Z. The process has been running for about 2 hours now and I want to suspend it by opening another terminal.... (3 Replies)
Discussion started by: rakeshou
3 Replies

6. Shell Programming and Scripting

Process not attached to terminal

Hi Folks, When i try to run schedule job on Unix server am getting following errror messges in logs pic_selection @starting on Fri Feb 5 01:53:06 GMT 2010 ------------------------------------------------------------------------------- Microfocus Cobol batch run Started: Fri Feb 5... (4 Replies)
Discussion started by: bhargav20
4 Replies

7. Solaris

Start process independent from TERMINAL (or also with PPID 1)

Hi *, please, I need fast tip (help). I have a process starting through /etc/rc3.d/xxxx script. However, sometimes (mostly because of testing reasons) I need to stop the process, change something and then start it again. But: 1) when I start it in terminal, the process dies when I leave the... (2 Replies)
Discussion started by: freeangel
2 Replies

8. Shell Programming and Scripting

need to extract terminal from this process -perl regx

Hi All, i ve a process, user4 31779 2836 0 01:43 pts/6 00:00:00 sh /home/user/DATE/SUT_SCR/c.sh like this i'll get so many process when in run ps -ef | grep pts | grep c.sh i need to extract terminal id from this string. i.e pts/6, or sometimes pts/22 same way i need to do for... (3 Replies)
Discussion started by: asak
3 Replies

9. UNIX for Beginners Questions & Answers

Need free Linux / UNIX Terminal over Internet

I do not wish to install Unix or Linux locally be it on my system or my Virtual box. I am looking for an online free Linux / Unix Terminal that i can connect and use. Something like ... Unix Terminal Online But the problem with Unix Terminal Online] is that i CANNOT ping it's ip which i... (3 Replies)
Discussion started by: mohtashims
3 Replies

10. AIX

Process on a specified Terminal and Socket Port does not start

Hi, I new to AIX, and I have been using Rocket UniData in it. I had to set up a Process for Data Exchange by assigning a unique Terminal and a Socket Port to that process. I ran the process for the first time and it was successful and after use I stopped the process. Now when I want to run it... (3 Replies)
Discussion started by: BejoyS
3 Replies
tty(1)								   User Commands							    tty(1)

NAME
tty - return user's terminal name SYNOPSIS
tty [-l] [-s] DESCRIPTION
The tty utility writes to the standard output the name of the terminal that is open as standard input. The name that is used is equivalent to the string that would be returned by the ttyname(3C) function. OPTIONS
The following options are supported: -l Prints the synchronous line number to which the user's terminal is connected, if it is on an active synchronous line. -s Inhibits printing of the terminal path name, allowing one to test just the exit status. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of tty: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Standard input is a terminal. 1 Standard input is not a terminal. >1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
isatty(3C), ttyname(3C), attributes(5), environ(5), standards(5) DIAGNOSTICS
not on an active synchronous line The standard input is not a synchronous terminal and -l is specified. not a tty The standard input is not a terminal and -s is not specified. NOTES
The -s option is useful only if the exit status is wanted. It does not rely on the ability to form a valid path name. Portable applications should use test -t. SunOS 5.10 1 Feb 1995 tty(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy