{"id":163,"date":"2012-06-30T04:18:42","date_gmt":"2012-06-29T22:48:42","guid":{"rendered":"http:\/\/asgaur.com\/wp\/?p=163"},"modified":"2014-04-02T10:54:07","modified_gmt":"2014-04-02T05:24:07","slug":"how-do-i-extend-the-terminal-width-or-set-term-variables-with-ksh-not-getting-the-full-command-info-from-ps-in-unix-terminal","status":"publish","type":"post","link":"http:\/\/www.asgaur.com\/wp\/how-do-i-extend-the-terminal-width-or-set-term-variables-with-ksh-not-getting-the-full-command-info-from-ps-in-unix-terminal\/","title":{"rendered":"How do I extend the terminal width or set term variables with ksh? \/ Not Getting the full command info from ps in Unix  terminal ?"},"content":{"rendered":"<p><!-- Adsense block #668 not displayed since it exceed the limit of 3 -->To identify processes to kill we need to view the FULL output from the ps command (we use the comm field). But by default we are not able to view full command.\u00a0 So here is the solution..<\/p>\n<h3>Solaris :<\/h3>\n<p>\/usr\/ucb\/ps -awux<\/p>\n<p>You may need two &#8220;w&#8221; options. From ps(1b):<\/p>\n<p>-w Uses a wide output format (132 columns rather than 80). If the option letter is repeated, that is, -ww, uses arbitrarily wide output. This information is used to decide how much of long commands to print.<\/p>\n<h3>AIX \/ Linux :<\/h3>\n<p>I have a putty remote session or any terminal session with ksh shell. When I insert a long command I can see \u2018&lt;&#8216; suddenly appear on the line and my command begins to scroll horizontally between prompt and &#8216;&lt;&#8216; sign while I keep on writing it.<\/p>\n<p>I want to make it clear: a &#8216;&lt;&#8216; sing does not appear at the end of the visible line (ie. limited by putty window) but in the middle of it. Is there a way to change it to higher value? I tried TERM, but did not set it.<\/p>\n<p>Answer: You have to define $COLUMNS after you login or in .kshrc. Similarly, you can also define $LINES.<\/p>\n<p>Open your .kshrc or edit .kshrc, and add<\/p>\n<p># echo $SHELL<br \/>\n\/usr\/bin\/ksh<br \/>\n# export COLUMNS=1000<br \/>\n# ps -ef<\/p>\n<p>&nbsp;<\/p>\n<div class=\"item_footer\">\n<p><small><a href=\"http:\/\/asgaur.com\/asgaur.php\/2010\/04\/21\/how-do-i-extend-the-terminal-width-or-set-term-variables-with-ksh-not-getting-the-full-command-info-from-ps-in-unix-terminal-2\" target=\"_blank\" rel=\"noopener\">Original post<\/a> blogged on <a href=\"http:\/\/b2evolution.net\/\" target=\"_blank\" rel=\"noopener\">b2evolution<\/a>.<\/small><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>To identify processes to kill we need to view the FULL output from the ps command (we use the comm field). But by default we are not able to view full command.\u00a0 So here is the solution.. Solaris : \/usr\/ucb\/ps -awux You may need two &#8220;w&#8221; options. From ps(1b): -w Uses a wide output format [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2,4,5,14],"tags":[184,315,321,322,320,323,240,318,316,178,319,317],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-aix","category-hp-ux","category-linux","category-solaris","tag-command","tag-extend","tag-full","tag-info","tag-ksh","tag-ps","tag-set","tag-term","tag-terminal","tag-unix","tag-variables","tag-width"],"_links":{"self":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":1,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":1148,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/posts\/163\/revisions\/1148"}],"wp:attachment":[{"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.asgaur.com\/wp\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}