<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Internal commands in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035866#M906221</link>
    <description>I believe Pete is correct, as a whence ls on my box does give this as the path, but which ls still  shows /usr/bin/ls&lt;BR /&gt;There is also no man page for whence, so I suspect/believe that whence is one of htose built-in commands that I had forgotten ;-]&lt;BR /&gt;Interestingly, if you start a ksh, and then do a whence ls, this DOES show /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 29 Jul 2003 09:28:22 GMT</pubDate>
    <dc:creator>melvyn burnard</dc:creator>
    <dc:date>2003-07-29T09:28:22Z</dc:date>
    <item>
      <title>Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035859#M906214</link>
      <description>&lt;BR /&gt; Hi all,&lt;BR /&gt;&lt;BR /&gt;   Is there anything called internal commands in HP Unix? I have renamed /usr/bin/ls to ls.old, still ls is listiing the directory. Where from this ls is getting executed?&lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Shahul</description>
      <pubDate>Tue, 29 Jul 2003 07:34:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035859#M906214</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2003-07-29T07:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035860#M906215</link>
      <description>Yes there are certain commands built-in to the shell, but cannot remember too many of them ;-}&lt;BR /&gt;If you wish to check where you are sourcing a command, you can always do:&lt;BR /&gt;whence &lt;COMMAND&gt;&lt;BR /&gt;for example&lt;BR /&gt;root @uksd3 #whence date&lt;BR /&gt;/usr/bin/date&lt;BR /&gt;&lt;BR /&gt;I do know cd is one of hte built-ins, and here is an example&lt;BR /&gt;root @uksd3 #whence cd&lt;BR /&gt;cd&lt;BR /&gt;&lt;BR /&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Tue, 29 Jul 2003 07:39:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035860#M906215</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2003-07-29T07:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035861#M906216</link>
      <description>Hi,&lt;BR /&gt;there is lots of Internal Commands in Unix whihc is part of shell basically.&lt;BR /&gt;like cd &lt;BR /&gt;ls is external command you can  find out which ls is getting excuted using which command &lt;BR /&gt;#which ls&lt;BR /&gt;&lt;BR /&gt;you will get answer.....&lt;BR /&gt;&lt;BR /&gt;sunil</description>
      <pubDate>Tue, 29 Jul 2003 07:46:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035861#M906216</guid>
      <dc:creator>Sunil Sharma_1</dc:creator>
      <dc:date>2003-07-29T07:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035862#M906217</link>
      <description>Some commands are built into shell. These are called internal.&lt;BR /&gt;&lt;BR /&gt;Check as follows.&lt;BR /&gt;&lt;BR /&gt;whence ls&lt;BR /&gt;type ls(type is a internal command in ksh)&lt;BR /&gt;which ls&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 07:49:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035862#M906217</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-07-29T07:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035863#M906218</link>
      <description>&lt;BR /&gt;  Hi,&lt;BR /&gt;&lt;BR /&gt;  which ls is giving /usr/bin/ls output. Even if I rename this, ls command works. Don't know where from this?&lt;BR /&gt;&lt;BR /&gt; Thanks and regards&lt;BR /&gt;Shahul</description>
      <pubDate>Tue, 29 Jul 2003 08:39:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035863#M906218</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2003-07-29T08:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035864#M906219</link>
      <description>Hi,&lt;BR /&gt;i know to be a bit late...&lt;BR /&gt;&lt;BR /&gt;From man csh you get a full list of the built-in commands.&lt;BR /&gt;&lt;BR /&gt;From man ksh you don't get the list, they are talked about here and there.&lt;BR /&gt;&lt;BR /&gt;     Massimo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 08:41:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035864#M906219</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-07-29T08:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035865#M906220</link>
      <description>Shahul,&lt;BR /&gt;&lt;BR /&gt;Most likely you're picking up /sbin/ls.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 09:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035865#M906220</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-29T09:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035866#M906221</link>
      <description>I believe Pete is correct, as a whence ls on my box does give this as the path, but which ls still  shows /usr/bin/ls&lt;BR /&gt;There is also no man page for whence, so I suspect/believe that whence is one of htose built-in commands that I had forgotten ;-]&lt;BR /&gt;Interestingly, if you start a ksh, and then do a whence ls, this DOES show /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 09:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035866#M906221</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2003-07-29T09:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035867#M906222</link>
      <description>shahul,&lt;BR /&gt;&lt;BR /&gt; it does take from /sbin/ls.&lt;BR /&gt;&lt;BR /&gt;internal commands are varies according to the shells.&lt;BR /&gt;&lt;BR /&gt; here are some.it may not be same in all shells and in all unix flavours.&lt;BR /&gt;&lt;BR /&gt;: (colon)     exec            shift&lt;BR /&gt;. (dot)       exit            times&lt;BR /&gt;break         export          trap&lt;BR /&gt;continue      readonly        wait&lt;BR /&gt;eval          return&lt;BR /&gt;&lt;BR /&gt;how are u ? &lt;BR /&gt;&lt;BR /&gt;radhakrishnan</description>
      <pubDate>Tue, 29 Jul 2003 09:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035867#M906222</guid>
      <dc:creator>Radhakrishnan Venkatara</dc:creator>
      <dc:date>2003-07-29T09:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035868#M906223</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if  output of "which ls" /usr/bin/ls &lt;BR /&gt;it means in /usr/bin directory ls is there&lt;BR /&gt;just check it once again.&lt;BR /&gt;and just post the output of &lt;BR /&gt;whereis ls&lt;BR /&gt;&lt;BR /&gt;command&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sunil</description>
      <pubDate>Tue, 29 Jul 2003 10:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035868#M906223</guid>
      <dc:creator>Sunil Sharma_1</dc:creator>
      <dc:date>2003-07-29T10:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035869#M906224</link>
      <description>The commands 'which' and 'whereis' are not useful in determining where a command will be found. The shell has many builtin's, namely cd and ls. which and whereis do NOT follow the same rules in looking for something to execute as the shell uses. And it is important to know that there MAY be slightly different beavior between the external command and a shell built-in. As mentioned, whence is the command to use but the best command is 'type' (an alias to whence -v, so use this: type type). ALWAYS use 'type' to determine what will happen when you type a particular string of characters. which and whereis know nothing about shell builtins and aliases. Try these:&lt;BR /&gt;&lt;BR /&gt;type ls&lt;BR /&gt;type cd&lt;BR /&gt;type pwd&lt;BR /&gt;type fc&lt;BR /&gt;type for&lt;BR /&gt;&lt;BR /&gt;For instance, which and whereis have no idea what 'for' might be, but 'type' (whence -v) definitely knows. Many shell built-in commands are found in /usr/bin but are simple shell scripts with the shell built-in:&lt;BR /&gt;&lt;BR /&gt;cat /usr/bin/ulimit&lt;BR /&gt;type ulimit&lt;BR /&gt;&lt;BR /&gt;There are also situations where the external command is better than the shell built-in:&lt;BR /&gt;&lt;BR /&gt;cd /usr/spool/lp&lt;BR /&gt;pwd&lt;BR /&gt;/usr/bin/pwd&lt;BR /&gt;&lt;BR /&gt;You'll see that the built-in pwd remembers how you got to the /usr/spool/lp (the legacy directory for the spooler, which is a symlink) but /usr/bin/pwd shows the 'real' directory (/var/spool/lp).&lt;BR /&gt;&lt;BR /&gt;The 'whence' (and 'type') commands are part of POSIX shells such as /usr/bin/sh and /usr/bin/ksh (and bash if you added that shell).&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jul 2003 11:03:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035869#M906224</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-07-29T11:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035870#M906225</link>
      <description>ls is in different directory :&lt;BR /&gt;/bin&lt;BR /&gt;/sbin&lt;BR /&gt;/usr/bin&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jerome</description>
      <pubDate>Tue, 29 Jul 2003 11:09:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035870#M906225</guid>
      <dc:creator>Jerome Baron</dc:creator>
      <dc:date>2003-07-29T11:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035871#M906226</link>
      <description>The  commands we execute are deteremed by PATHS.  Listed is a copy of my &lt;BR /&gt;wh command.  which is also linked as whall in my user local bin.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#ident "@(#)    Rory Hammond - - /usr/local/bin/wh"&lt;BR /&gt;# 07-11-93   replaced C program with this shell&lt;BR /&gt;#&lt;BR /&gt;#       wh&lt;BR /&gt;#&lt;BR /&gt;#       Examine the path for a command &amp;amp; tell which dir has it. Stop with&lt;BR /&gt;#       the 1st dir that has it.&lt;BR /&gt;#&lt;BR /&gt;#        whall  link whall to wh and it will find all occurance in the paths&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;if [ $# -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;        echo "usage:\t$0 prognam ...." | sed -e 's/\/\//\//g'&lt;BR /&gt;        exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;dirs=`echo $PATH |&lt;BR /&gt;       sed -e 's/^:/.:/' -e 's/:$/:./' -e 's/::/:.:/' -e 's/:/ /g'`&lt;BR /&gt;&lt;BR /&gt;notfound=&lt;BR /&gt;&lt;BR /&gt;for ffile in $*&lt;BR /&gt;do&lt;BR /&gt;        found=0&lt;BR /&gt;&lt;BR /&gt;        for dir in $dirs&lt;BR /&gt;        do&lt;BR /&gt;                if [ -x ${dir}/${ffile} -a ! -d "${dir}/$1" ]&lt;BR /&gt;                then&lt;BR /&gt;                        echo "${dir}/${ffile}"| sed -e 's/\/\//\//g'&lt;BR /&gt;                        found=1&lt;BR /&gt;                        if [ $0 = "whall" ]&lt;BR /&gt;                        then&lt;BR /&gt;                                break&lt;BR /&gt;                        fi&lt;BR /&gt;                fi&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;        if [ ${found} -eq 0 ]&lt;BR /&gt;        then&lt;BR /&gt;                notfound="${notfound} $1"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        shift&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;#report the not found&lt;BR /&gt;&lt;BR /&gt;for arg in $notfound&lt;BR /&gt;do&lt;BR /&gt;        echo "${arg} not found"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 14:50:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035871#M906226</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2003-07-30T14:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035872#M906227</link>
      <description>Shahul,&lt;BR /&gt;&lt;BR /&gt;You might have picked up /sbin/ls.&lt;BR /&gt;&lt;BR /&gt;# whereis ls&lt;BR /&gt;&lt;BR /&gt;shows the paths of ls.&lt;BR /&gt;&lt;BR /&gt;Removing sbin from the path will stop ls from working in your case.&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Wed, 30 Jul 2003 15:00:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035872#M906227</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-07-30T15:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035873#M906228</link>
      <description>I am very sorry, posted the incorrect source to wh.&lt;BR /&gt;&lt;BR /&gt;Whereis shows all occurance.  The shell script shows which one you are executing&lt;BR /&gt;&lt;BR /&gt;The man pages do describe commands.  One of the problems that you encounter alias will fool you path&lt;BR /&gt;&lt;BR /&gt;alias ls="/sbin/ls -l"&lt;BR /&gt;&lt;BR /&gt;man sh-bourne lists the "special commands"&lt;BR /&gt;&lt;BR /&gt;rory&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#ident "@(#)    Rory Hammond -menlo - /usr/local/bin/wh"&lt;BR /&gt;# 07-11-93   replaced C program with this shell&lt;BR /&gt;#&lt;BR /&gt;#       wh&lt;BR /&gt;#&lt;BR /&gt;#       Examine the path for a command &amp;amp; tell which dir has it. Stop with&lt;BR /&gt;#       the 1st dir that has it.&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;if [ $# -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;        echo "usage:\t$0 prognam ...." | sed -e 's/\/\//\//g'&lt;BR /&gt;        exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;dirs=`echo $PATH |&lt;BR /&gt;       sed -e 's/^:/.:/' -e 's/:$/:./' -e 's/::/:.:/' -e 's/:/ /g'`&lt;BR /&gt;&lt;BR /&gt;notfound=&lt;BR /&gt;&lt;BR /&gt;for ffile in $*&lt;BR /&gt;do&lt;BR /&gt;        found=0&lt;BR /&gt;&lt;BR /&gt;        for dir in $dirs&lt;BR /&gt;        do&lt;BR /&gt;                if [ -x ${dir}/${ffile} -a ! -d "${dir}/$1" ]&lt;BR /&gt;                then&lt;BR /&gt;                        echo "${dir}/${ffile}"| sed -e 's/\/\//\//g'&lt;BR /&gt;                        found=1&lt;BR /&gt;                        break&lt;BR /&gt;                fi&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;        if [ ${found} -eq 0 ]&lt;BR /&gt;        then&lt;BR /&gt;                notfound="${notfound} $1"&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;        shift&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;#report the not found&lt;BR /&gt;&lt;BR /&gt;for arg in $notfound&lt;BR /&gt;do&lt;BR /&gt;        echo "${arg} not found"&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 16:55:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035873#M906228</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2003-07-30T16:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Internal commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035874#M906229</link>
      <description>if... as an example you were executing "ls" as many people are using....&lt;BR /&gt;&lt;BR /&gt;type ls&lt;BR /&gt;&lt;BR /&gt;this will show you where the ls command was executed from.  &lt;BR /&gt;&lt;BR /&gt;if you are concerned that it might be an aliased command try this&lt;BR /&gt;&lt;BR /&gt;alias&lt;BR /&gt;&lt;BR /&gt;this will show you a list of all aliases you have assigned.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 17:27:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/internal-commands/m-p/3035874#M906229</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-07-30T17:27:23Z</dc:date>
    </item>
  </channel>
</rss>

