Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-30-2014, 07:15 PM   #1
Registered: Apr 2014
Posts: 63

Rep: Reputation: Disabled
Not able to execute file, though file exists

I am logged in to server as oracle user and running a script, but it says it doesn't exists. Not sure, why it is complaining. Can somebody help me on this
oracle@db_serv01:/UPGRADE> ls -l orachk
-rwxr-xr-x 1 oracle dba 1428123 2014-04-30 17:11 orachk
oracle@db_serv01:/UPGRADE> head -2 orachk
#!/bin/env bash
oracle@db_serv01:/UPGRADE> ./orachk
-ksh: ./orachk: not found [No such file or directory]
oracle@db_serv01:/UPGRADE> echo $SHELL
oracle@db_serv01:/UPGRADE> bash
db_serv01: /UPGRADE
(tty/dev/pts/4): bash: 44 > ./orachk
bash: ./orachk: /bin/env: bad interpreter: No such file or directory
db_serv01: /UPGRADE
(tty/dev/pts/4): bash: 45 >
Old 04-30-2014, 08:12 PM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,298

Rep: Reputation: Disabled
It finds the file just fine, but says /bin/env (the file specified as the script interpreter by the #! line) doesn't exist.
1 members found this post helpful.
Old 04-30-2014, 09:54 PM   #3
Registered: Apr 2014
Posts: 63

Original Poster
Rep: Reputation: Disabled
Thanks. I was able to run it after correction in first line. I just added correct path of env


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash: No such file or directory, when file actually exists. SkyerSK Linux - Software 13 02-06-2011 04:33 AM
webdav: File exists error while creating new file rdo Linux - Server 3 06-20-2010 11:30 AM
no such file or directory exists when trying to execute a exe ryedawg Linux - Software 5 12-05-2005 05:42 AM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 08:29 AM
Linker problem: can't find a file, but the file exists atlep Programming 5 08-16-2004 06:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 PM.

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