Operating System - HP-UX
1833920 Members
4293 Online
110063 Solutions
New Discussion

Re: How can I make a file common?

 
SOLVED
Go to solution
Henry Chua
Super Advisor

How can I make a file common?

I have created a script but I need to make it common so that I can run wherever in the system, how can I achieve this?

Thank you for your kind advise !! =)
3 REPLIES 3
Sunil Sharma_1
Honored Contributor
Solution

Re: How can I make a file common?

If i am not wrong you want to make a file accessable from any directory. You can do this by adding path of that script to /etc/PATH file.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Franky_1
Respected Contributor

Re: How can I make a file common?

Hi,

just add the dir in which the script resides to your PATH Variable and then you're able to run it from wherever you are

Regards

Franky
Don't worry be happy
Muthukumar_5
Honored Contributor

Re: How can I make a file common?

We have to export that PATH on PATH environment varible. Default searchable path will be given in /etc/PATH file. Include the new path there.

PATH=/usr/sbin:/usr/bin:/usr:/tmp .. like that.

Else simply add that script on /usr/bin/ or /usr/sbin/ location so that those path's are in searchable path.

Change the permission of script to 755 to execute them
Easy to suggest when don't know about the problem!