LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-02-2016, 01:02 AM   #1
starqazi
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Rep: Reputation: Disabled
Error while running .bash_profile


Hi All,

When I execute following command I get below error in linux .

$ . .bash_profile
-bash: /home/oracle: is a directory


Why I am getting this "-bash: /home/oracle: is a directory"?

Permissions of oracle directory are set as:
drwx------. 29 oracle oinstall 4096 Feb 2 20:20 oracle/

Your help is highly appreciated in advance.

Regards,
Qazi
 
Old 02-02-2016, 06:02 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
The file .bash_profile is not a binary file, which, under M$Windows term: NOT AN EXE <bold meant only for emphasis> and therefore not executable. Your file is a profile configuration, meaning, it sets environments, defines symbols or sets configurations when bash shell runs. Compare the file to M$Windows .INI file, more or less like that.

To see how the file works you run "bash" shell by simple typing in the terminal
Quote:
$ bash <Enter>
the bash shell reads from .bash_profile or .bashrc. Under BSD our default shell is either "csh", "sh" or "tcsh", we needed to install the bash shell first then when installed we type "bash" at terminal prompt to enter into bash shell. Mostly bash (under any Gnu/Linux) uses the profiling file at $HOME/.bashrc.

I hope that helps.

Good luck and enjoy.

m.m.
 
Old 02-02-2016, 06:09 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
What he said ...

If I may add to what he said:

There may be more reasons for the error WITHIN the .bash_profile, but without knowing the contents we have no way to judge.

Would you be interested in proving that additional information?
 
1 members found this post helpful.
Old 02-02-2016, 06:12 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
type bash -xv ~/.bash_profile and you will see what's happening. If not please post the output
 
Old 02-02-2016, 06:41 AM   #5
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Please cat to us what's inside the file:
Quote:
cat .bash_profile <Enter>
and post here the result for us to read.

BTW are you using "oracle" as your user name?
 
Old 02-02-2016, 09:50 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You almost certainly have a typo in your .bash_profile.
 
Old 02-02-2016, 11:31 PM   #7
starqazi
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Smile Issue Resolved!!!

Thanks all for help.

I just created a file, copy .bash_profile contents to new file.Delete all contents of .bash_profile file and copy back all contents from new file to .bash_profile. It resolve my problem but I do not know what was the issue.

Thanks again.

Regards,
Qazi
 
Old 02-03-2016, 02:25 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by starqazi View Post
It resolve my problem but I do not know what was the issue.
we never saw that malformed .bash_profile.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian ~/.bash_profile execution error WarTurkey Debian 5 03-28-2012 08:50 AM
[SOLVED] Slackware 13.0 ~/.bash_profile not running at login ash_zz_00 Linux - Newbie 9 03-09-2012 01:58 PM
Difference between running script (.sh) from .bash_profile and running from login dsimha Linux - General 4 01-17-2012 10:06 AM
why my alias is effective only after running . /home/oracle/.bash_profile redhatwannabe Linux - General 2 05-14-2009 01:34 AM
Error encountered in LFS v6.0 Ch. 4 .bash_profile mbreslin1954 Linux From Scratch 2 04-19-2005 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration