The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find recently updated files in home directory Kain Shell Programming and Scripting 2 10-31-2008 08:20 PM
How to get files from a previous home directory after Archive and Install iBot OS X Support RSS 0 10-13-2008 11:20 PM
Strange files keep appearing in my home directory schallstrom Security 6 06-15-2008 08:42 AM
Newbie Questions mharley Shell Programming and Scripting 2 03-01-2005 10:08 AM
A few newbie questions hellz UNIX for Dummies Questions & Answers 7 09-01-2001 11:24 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-24-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
Newbie questions about HOME directory files

Hi,

I am newbie to Solaris and system administration in general, and I have a couple of questions about files in my HOME directory.

When I perform ls -la, I get the following list of files:

Code:
drwxr-xr-x   7 XXXYYY staff         17 Aug 24 07:31 .
drwxr-xr-x   7 root     root           7 Jul 31 10:13 ..
-rw-------   1 XXXYYY staff       5145 Aug 23 12:44 .bash_history
-rw-r--r--   1 XXXYYY staff         68 Aug  1 10:59 .bash_login
-rw-r--r--   1 XXXYYY staff        280 Jul 31 10:13 .bashrc
drwxr-xr-x   6 XXXYYY staff         10 Aug 23 06:51 .hudson
drwxr-xr-x   3 XXXYYY staff          3 Aug  1 11:15 .m2
-rw-r--r--   1 XXXYYY staff        611 Jul 31 10:13 .profile
drwx------   2 XXXYYY staff          3 Jul 31 10:20 .ssh
drwx------   3 XXXYYY staff          3 Jul 31 14:40 .sunw
...
-rw-r--r--   1 XXXYYY staff       1039 Jul 31 10:13 local.cshrc
-rw-r--r--   1 XXXYYY staff        988 Jul 31 10:13 local.login
-rw-r--r--   1 XXXYYY staff       1002 Jul 31 10:13 local.profile
This week-end, I found out that I could not access 'svcadm' may be because my path was missing /usr/sbin/. I am getting the bash shell when I log in (echo $SHELL returns /usr/bin/bash).

I have been doing some reading on the Internet and it seems like:

i) local.cshrc is the shell start-up initialization file for the C shell, correct? If yes, it is not executed because I am under bash, correct?

ii) local.login is the login initialization file for the C shell, correct? If yes, it is not executed because I am under bash, correct?

iii) local.profile is the shell start-up initialization for the Bourne and Korn shells, correct? If yes, it is not executed because I am under bash, correct?

iv) What is the '.profile' file exactly? In my case, it exports a couple of variables and defines the default prompt. Is this file executed when I log in?

v) What is the '.bashrc' file exactly? It define the default prompt in my case. Is this file executed when I log in?

vi) '.bash_login' is a file I had to create as part of installation instructions for Maven. It exports the Maven path and adds it to the PATH variable. This file is obviously executed when I log in, because without it, I cannot run Maven from anywhere.

My question is: is there a way to export those variables for everyone who logs in? If yes, how should I proceed?

vii) '.bash_history' contains the list of commands I have been using recently. I have no questions about it.

viii) When I echo $PATH, I get

Code:
/usr/local/maven/bin:/usr/bin
which fits perfectly with what I am doing in .bash_login. It seems that only .bash_login is executed when I am logging in? Is this correct? Or are other default files executed too?

Thanks,

JVerstry

---------- Post updated at 07:24 PM ---------- Previous update was at 05:28 PM ----------

I have found a link (Bash env settings problems - comp.unix.solaris | Google Groups) which helped me answering some of my question. I have also performed a couple of tests.

/etc/profile is first executed, then .bash_login.

.profile is not executed, because .bash_login exists and is readable.

Since my .profile file contains:

Code:
export PATH=/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
this explains why I could not access svcadm.

JVerstry
  #2 (permalink)  
Old 08-25-2009
lowbyte lowbyte is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 73
No,

for svcadm you have to be root.
Profile is executed every time you log in.

cu
lowbyte
  #3 (permalink)  
Old 08-25-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
I was/am root. Thanks.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0