LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-22-2010, 10:19 AM   #1
zachet
LQ Newbie
 
Registered: May 2009
Posts: 20

Rep: Reputation: 0
File Exists but... "-bash: No such file or directory"


Hello,

I am curious what could cause bash to describe a file as not existant however it is obviously existant with proper permissions with a quick 'ls' command. This has occured on a Ubuntu Server Installation and it has also been attempted with ' Sudo '. I am curious what would be the default troubleshooting steps in such as situation, what causes this?

I am aware the path to the file is correct, full path and direct current directory has been specified with same results.

Thanks!
 
Old 01-22-2010, 10:21 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
have you tried to edit the file or are you executing it? have you tried name completion to finish typing it (maybe a trailing whitespace char for instance.) Have you tried to open it with say a file manager?
 
Old 01-22-2010, 10:25 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Please post the commands and output you use
 
Old 01-22-2010, 10:39 AM   #4
zachet
LQ Newbie
 
Registered: May 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Unfortunately I am not able to actually display these commands or output due to certain circumstances unless I personally modify all the details out which would be believed to make the information useless in the first place. It is simply being executed itself with '$./FILENAME', '$SUDO ./FILENAME ' or '$/path/to/directory' and I am simply being given the generic bash, ' No such file or directory ' although it does display and is existant.

Due to these circumstances is why I more or less requested general possibilities.

I do enjoy the idea of the possibility of special-character or white-space.

Could this have anything to do between Arch, such as running a 64-bit execute without 64-bit libraries? Is there a way to tell which ARCH the file type is?
 
Old 01-22-2010, 10:42 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Is the file executable ?
 
Old 01-22-2010, 11:02 AM   #6
zachet
LQ Newbie
 
Registered: May 2009
Posts: 20

Original Poster
Rep: Reputation: 0
I am able to execute file on the 'file' and get, ' ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped '.
 
Old 01-22-2010, 11:14 AM   #7
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
I think repo was asking-- is the execute bit set--

chmod o+x filename

Then try to run it again
 
Old 01-22-2010, 12:07 PM   #8
zachet
LQ Newbie
 
Registered: May 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Yes, proper permissions do exist, with full executable bits.

If this was not so I believe this would also specify a permission denied error as I did a quick test.

Attempting as ' su - ' provides the same results.

Creation of a test file in the same path and permissions works fine.

I am starting to believe there's an issue with the file itself, although the error message is what is throwing me off.
 
Old 01-22-2010, 12:32 PM   #9
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Rep: Reputation: 115Reputation: 115
You are aware Linux is case sensitive, right?

Have you tried copying the file from the ls output and pasting it into the command. (Copy by selecting it, paste by middle-clicking). That would deal with anything like odd characters.
 
Old 01-22-2010, 01:22 PM   #10
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Rep: Reputation: 27
Just a couple of quick thoughts.

Is it possible that either:
a) The file/program you are attempting to execute has leading or trailing white characters (ie. spaces, tabs, etc..) in it's name ?
b) The file/program is missing some libraries ? (ie. bash is complaining about the missing libraries and not the missing file)
Does "ldd ./FILENAME" report any missing libraries ?

--ET
 
Old 10-15-2010, 10:16 AM   #11
alex.katovsky
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Code:
uname -a <file>
gives the architecture. This needs to match the one given by the

Code:
file <file>
command!
 
Old 10-15-2010, 10:58 AM   #12
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
Unfortunately I am not able to actually display these commands or output due to certain circumstances unless I personally modify all the details out which would be believed to make the information useless in the first place. It is simply being executed itself with '$./FILENAME', '$SUDO ./FILENAME ' or '$/path/to/directory' and I am simply being given the generic bash,
Has anyone here ever known a "branded" (non-generic) bash?

One clear specific information about the problem is worth better than a thousand blahs of gorgeous flowery talk.

Quote:
No such file or directory ' although it does display and is existant.
Due to these circumstances is why I more or less requested general possibilities.
OMG! Please speak English.

Unless you tell us what you have done, what files, which directories and reported error...... well, there is no end for grandiose oration.



we wait.
 
Old 10-15-2010, 11:04 AM   #13
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hi folks

Did anyone notice that the last reply to this thread before today, was back in January?? And the OP has not logged in since March.

Cheers!
 
Old 10-15-2010, 11:48 AM   #14
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Oooopss!

Ha ha ha I didn't imagine I was helping out a ghost. I didn't bother checking the dates. I was merely using the Zero Reply button hoping to become useful to the community when my time affords this pleasure.
 
Old 10-15-2010, 11:52 AM   #15
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556


And (I'm curious) how did the "Zero reply button" get you here, to a thread with 10+ replies?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
[SOLVED] iostream.h exists, yet facing "iostream.h: No such file or directory" mq15 Linux - Software 13 01-02-2010 09:13 AM
fail to start xterm: "could not exec /usr/OSE/bash: No such file or directory" freeindy Linux - General 3 11-28-2008 12:22 AM
Strangely, bash tells me "no such file or directory", but it's there!? ramchip Linux - Software 13 02-26-2008 05:09 AM
LFS 6.2 Ch. 6.14 - 2nd Coreutils test returns "/bin.bash: No such file or directory" 0graham0 Linux From Scratch 2 08-23-2007 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:19 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