Operating System - HP-UX
1752646 Members
5698 Online
108788 Solutions
New Discussion юеВ

Re: Where is "shortp" located.

 
Raynald Boucher
Super Advisor

Where is "shortp" located.

Hello all,
I have a process "shortp" on my system that I can use from everywhere.

My question is: Where is it?

"which" doesn't show it. Nor does "man -k".
"alias" returns "shortp=_ShPS_".
So where can I find the source for this process?

RayB
9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: Where is "shortp" located.

The answer might be in your question already ... try "whereis" and "find", but not with the alias.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Raynald Boucher
Super Advisor

Re: Where is "shortp" located.

Here are the results.

# whereis _ShPS_
_ShPS_:
# find / -local -name _ShPS_
find: cannot search /mnt/tyche/dev_backup
#

RayB
Mike Miller_8
Regular Advisor

Re: Where is "shortp" located.

Try :

find / -follow -name "_ShPS_" -print
Dennis Handly
Acclaimed Contributor

Re: Where is "shortp" located.

>that I can use from everywhere.

If you can execute that from every user, you should be able to use "whence -v _ShPS_" to get its path.
Raynald Boucher
Super Advisor

Re: Where is "shortp" located.

results:

$ whence -v _ShPS_
_ShPS_ is a function
$

"man -k function" returns 1000 lines...
I'm still stuck.

RayB
Dennis Handly
Acclaimed Contributor

Re: Where is "shortp" located.

>_ShPS_ is a function

Scan your .profile and any other files that are sourced for your shell function.
I assume you aren't using FPATH?
Mike Miller_8
Regular Advisor

Re: Where is "shortp" located.

Dennis is right - look in your .profile, .kshrc, etc for a script that defines a function and exports it.

File name is 'func1':
junk()
{
ls -l func1
}
export junk
junk
whence -v junk
Viktor Balogh
Honored Contributor

Re: Where is "shortp" located.

Hi Raynald,

If you are using ksh try the "functions" command to list the defined functions. It might be defined from your .profile file.
****
Unix operates with beer.
Vipin Kumar
Occasional Advisor

Re: Where is "shortp" located.

Hi Ray,

Can u check the same with ptree command.
ptree

Vipin