- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- What is difference between these 2 commands.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 08:56 PM
03-19-2006 08:56 PM
I am running these commands but, not getting difference.
kill -1 `ps -C sleep -o pid
kill -1 `ps -C sleep -o pid=`
see the snap that might help in analyzing.
prasad@prasad:~> sleep 10000 &
[1] 19081
prasad@prasad:~> sleep 10000 &
[2] 19085
prasad@prasad:~> kill -1 `ps -C sleep -o pid`
bash: kill: PID: arguments must be process or job IDs
[1]- Hangup sleep 10000
[2]+ Hangup sleep 10000
prasad@prasad:~> ps -C sleep -o pid
PID
prasad@prasad:~> sleep 10000 &
[1] 19097
prasad@prasad:~> sleep 10000 &
[2] 19101
prasad@prasad:~> ps -C sleep -o pid
PID
19097
19101
prasad@prasad:~> kill -1 `ps -C sleep -o pid=`
[1]- Hangup sleep 10000
[2]+ Hangup sleep 10000
prasad@prasad:~> ps -C sleep -o pid
PID
Thanks in advance.
Prasad.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:03 PM
03-19-2006 09:03 PM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:05 PM
03-19-2006 09:05 PM
Re: What is difference between these 2 commands.
what version of OS/kill command are you running:
what `which kill`
ps -o is a XPG4 option only.
man ps will give you the details.
The "=" is the indicator that the next data item is to be used for heading
" A column name can optionally be followed by an equals sign (=) and a string to use as the heading for that column."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:06 PM
03-19-2006 09:06 PM
Re: What is difference between these 2 commands.
b) ps -C sleep -o pid=
Difference:
a) will give Heading like PID. But b) will not give heading.
Example:
# UNIX95=1 ps -o pid
PID
27726
6364
6365
# UNIX95=1 ps -o pid=
27727
6364
6365
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:07 PM
03-19-2006 09:07 PM
Re: What is difference between these 2 commands.
A column name can optionally be followed by an equals sign (=) and a string to use as the heading for that column.
If an empty column heading is specified for every heading, no heading line will be printed.
Refer -o format part. Search key XPG4
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:12 PM
03-19-2006 09:12 PM
Re: What is difference between these 2 commands.
Take a look at man ps, it will give you all the details.
http://docs.hp.com/en/B2355-60127/ps.1.html
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 09:54 PM
03-19-2006 09:54 PM
Re: What is difference between these 2 commands.
#man ps & # man kill , along with try it with a dummy kill.
hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 10:09 PM
03-19-2006 10:09 PM
Re: What is difference between these 2 commands.
bash-2.02# what `which kill`
/usr/bin/kill:
$Revision: B11.23_LR
Fri Aug 29 21:23:26 PDT 2003 $
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 10:33 PM
03-19-2006 10:33 PM
Re: What is difference between these 2 commands.
It seems stupid, but I am new to Hp-UX. You can understand.
# UNIX95=1 ps -o pid
# UNIX95=1 ps -o pid=
Why variable (may or maynot be variable) UNIX95 is involned in these commands?
What does UNIX95=1 actually mean? What is that '1' for?
Thanks & regards.
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 11:48 PM
03-19-2006 11:48 PM
Re: What is difference between these 2 commands.
Got answer.
Thansks & regards.
Prasad