i cant find my .profile file

Thread Solved

Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 121
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

i cant find my .profile file

 
0
  #1
Sep 24th, 2009
i changed the directory using cd $HOME but i dont see any .profile files under that directory. am i missing it? or it can be under some other directory? is it required to have it?
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,344
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 602
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: i cant find my .profile file

 
0
  #2
Sep 24th, 2009
No, it is not required to have and depends on the shell you're using. For example bash uses .bash* prefixed files:
sk@sk:~$ ls -al .ba*
-rw------- 1 sk wheel 148196 Sep 24 14:18 .bash_history
-rw-r----- 1 sk wheel    509 May  9  2005 .bash_profile
-rw-r----- 1 sk wheel   1093 Oct 15  2004 .bashrc

There is also global profiles for most shells:
sk:/etc# ls -al bash.bashrc
-rw-r--r-- 1 root root 1127 Mar  4  2005 bash.bashrc

You can also just cd to return to your home directory:
sk@sk:/var/lib$ cd
sk@sk:~$
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 121
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: i cant find my .profile file

 
0
  #3
Sep 24th, 2009
i use korn shell, ksh
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,344
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 602
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: i cant find my .profile file

 
0
  #4
Sep 24th, 2009
Here is the ksh login logic:
  1. If the shell is invoked by exec(2), and the first character of argument zero ($0) is -, then the shell is assumed to be a login shell and commands are read from /etc/profile and then from either .profile in the current directory or $HOME /.profile, if either file exists. Next, for interactive shells, commands are read from the file named by performing parameter expansion, command substitution, and arithmetic substitution on the value of the environment variable ENV if the file exists. If the -s option is not present and arg and a file by the name of arg exits, then it reads and executes this script. Otherwise, if the first arg does not contain a /, a path search is performed on the first arg to determine the name of the script to execute. The script arg must have execute permission and any setuid and setgid settings will be ignored. If the script is not found on the path, arg is processed as if it named a built-in command or function. Commands are then read as described below; the following options are interpreted by the shell when it is invoked:

Files used:
  1. /etc/passwd
  2. /etc/profile
  3. /etc/suid_profile
  4. $HOME /.profile
  5. /tmp/sh*
  6. /dev/null

ksh man page
Last edited by sknake; Sep 24th, 2009 at 4:09 pm.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 121
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: i cant find my .profile file

 
0
  #5
Sep 24th, 2009
i cant add to your reputation for today, i will tomorrow.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum
Thread Tools Search this Thread



Tag cloud for *nix Software
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC