Please help me find the PATH that I need to be on :)


 
Thread Tools Search this Thread
Operating Systems Solaris Please help me find the PATH that I need to be on :)
# 1  
Old 03-17-2006
Question Please help me find the PATH that I need to be on :)

I am learning UNIX through the School of Hard Knocks, I have very limited exposure to it.
I managed to install Solaris 10 on my machine recently, and have downloaded and installed Sun Studio 11. When the installation of Sun Studio was complete, the GUI displayed the following:
(Bourne shells)
$PATH = opt/SUNWspro/bin : $ PATH; export PATH
(C shells)
% setenv PATH /opt/SUNWspro/bin: $ PATH

I am at a loss as to where or how to edit the PATH, and am not sure about how to set the environment either. If anyone can point me in the right direction (and get me back on the PATH), it would greatly be appreciated.
# 2  
Old 03-18-2006
Quote:
(Bourne shells)
$PATH = opt/SUNWspro/bin : $ PATH; export PATH
(C shells)
% setenv PATH /opt/SUNWspro/bin: $ PATH
It was telling you to set the PATH to contain /opt/SUNWspro/bin so the commands would be availabe without having to type in /opt/SUNWspro/bin/xxxcommand or whatever command you were looking to run as part of that package.

Bourne shells (/bin/sh or /bin/ksh) use $PATH=/opt/SUNWspro/bin:$PATH; export PATH to set the SUNWspro bin directory in your PATH. Bin directories usually contain binary files (programs, executables). If your prompt is a $, then you probably have sh or ksh as your shell (you can tell by doing echo $SHELL)

And then for C shells, the command is a little bit different (as shown above).

To set it up that you don't have to type it every time you sign in, check which shell you use, and then edit the appropriate startup file in your home directory. Csh - add it to .login, Bourne shell - add it to your .profile
# 3  
Old 03-22-2006
RTM,
Thanks for the response. I haven't had the chance to try out what you posted, but as soon as I have some time, I will give it a try and let you know how it went.
Again,
thank you.
# 4  
Old 03-30-2006
Quote:
Originally Posted by RTM
It was telling you to set the PATH to contain /opt/SUNWspro/bin so the commands would be availabe without having to type in /opt/SUNWspro/bin/xxxcommand or whatever command you were looking to run as part of that package.

Bourne shells (/bin/sh or /bin/ksh) use $PATH=/opt/SUNWspro/bin:$PATH; export PATH to set the SUNWspro bin directory in your PATH. Bin directories usually contain binary files (programs, executables). If your prompt is a $, then you probably have sh or ksh as your shell (you can tell by doing echo $SHELL)

And then for C shells, the command is a little bit different (as shown above).

To set it up that you don't have to type it every time you sign in, check which shell you use, and then edit the appropriate startup file in your home directory. Csh - add it to .login, Bourne shell - add it to your .profile
I understand that it is telling me to change the PATH to what is listed; however, I am unsure as to where I am to find these files that need to be edited. I can't seem to locate the ".login" and ".profile" files. Like I mentioned before, I am learning this the hard way Smilie
Also, my prompt appears as a "#", and I am having an issue remembering how to change between "$" and "#" and back again (just a mental block on my part. I can do it at work, but at home, it doesn't make it through the front door with me).
Thanks for your help.
# 5  
Old 04-19-2006
Quote:
Originally Posted by trmn8r
Also, my prompt appears as a "#", and I am having an issue remembering how to change between "$" and "#" and back again (just a mental block on my part. I can do it at work, but at home, it doesn't make it through the front door with me).
Thanks for your help.
I think that I brought this little tid-bit of information home with me the other day...
# appears when I am logged in as "root"
"$" and "%" appear when I am logged in as a "user"
(Like I said, mental block on my part)

Now all I have to do is find where the ".login" and ".profile" files are hiding at. I've tried using "ls -la" to locate them (in the most obvious directories), but so far haven't been able to find them. Can I use a find command with the filename to locate them?

Thanks.
# 6  
Old 04-21-2006
The .login, .profile files are in each user's home directory - ls -a should show if the files are there or not (they aren't mandatory files - they may need to be created - just keep the permissions at 600 {see chmod man page}).

There are system profile files in /etc (on Solaris) - if your changes are required to be system wide, then look at /etc/profile and /etc/.login - see the man page for login.
# 7  
Old 04-24-2006
[QUOTE=RTM]The .login, .profile files are in each user's home directory - ls -a should show if the files are there or not (they aren't mandatory files - they may need to be created - just keep the permissions at 600 {see chmod man page}).[QUOTE]
I just recently had the time to create a new user account. I think that part of the problem was that I was trying to do this (modify the files) under "root" (?).
I checked to see if there were .login and .profile for my new user account, they are there, but I have not had time to edit them. I will let you know what happens. Thanks again for all the help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to find the path of a command?

Hi guys. I want to know the path of a command. I tried "which" command also . But no luck. Please tell me how to find and update the correct path of the command. Here I'm unable to find the path of ext2online command # resize2fs /dev/vg01/lvora_backup resize2fs 1.39 (29-May-2006)... (3 Replies)
Discussion started by: vamshigvk475
3 Replies

2. Red Hat

How to find the SAN path?

Hi folks, How to identify the SAN is running in Single path or dual source path for linux servers. (2 Replies)
Discussion started by: gsiva
2 Replies

3. Shell Programming and Scripting

Find the length of a path

Hey, I got a question: how do I find the length of a path ? this is the context: I used this funtion find: DIR="/home/name/directory" find DIR -name "*.extension" The output is then: /home/name/directory/filename.extension What I'd like to have is only the last part:... (3 Replies)
Discussion started by: Miki1579
3 Replies

4. Shell Programming and Scripting

"find . -printf" without prepended "." path? Getting path to current working directory?

If I enter (simplified): find . -printf "%p\n" then all files in the output are prepended by a "." like ./local/share/test23.log How can achieve that a.) the leading "./" is omitted and/or b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies

5. Shell Programming and Scripting

How to a find a file in which path it is there?

Hi Firends, Good Morning to all, I want a find command to search a paticular file present in my system(ie search through under all users and all directories.) I am looking forward from you.:) Advance Thanks, Siva Ranganath CH (3 Replies)
Discussion started by: sivaranga001
3 Replies

6. UNIX for Dummies Questions & Answers

PATH set but I can't find where!!!!

Hi, Can anybody help with this? When I log into my user account on my box via ssh and then instantly perform an env command I see that my path has been set as follows: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin My user account uses the ksh shell. In my home directory there is no... (7 Replies)
Discussion started by: Donkey25
7 Replies

7. Shell Programming and Scripting

How to find the path

Hi Iam new to this forum, could you pleae advise for below question iam send path as input before proceding i need to validate the path if it is exit or not if not it show path id not exist if the path is exits iam sending file name as input to search the file on the paricular... (5 Replies)
Discussion started by: saic
5 Replies

8. Shell Programming and Scripting

how to find the path of a file?

Hi all, Is there any way to find the the path of a file? I mean executable files and just anyother file we can think of? i know of one cmd called which $which mount /usr/bin/mount this is fine, but "mount" is a cmd not a file that can be searched eg: say i have created a text file... (3 Replies)
Discussion started by: wrapster
3 Replies

9. Shell Programming and Scripting

negation in find path

Guys, Pl suggest me how to ignore a path in find command... I am aware of using "!" for other option... but how can i use it like this exampl... I want to search something for in / but not in Pl help. Thanks.. (2 Replies)
Discussion started by: clx
2 Replies

10. Shell Programming and Scripting

How to find whether the given path is in Network

Dear All, I have a problem in knowing ..how the network path is represented in the unix ..I need sample in shell script to find whether the given path is in network or not . (0 Replies)
Discussion started by: yessowmya
0 Replies
Login or Register to Ask a Question