Unable to execute a symbolic link in linux

Posted on 2010-09-11
Last Modified: 2012-05-10
Running redhat enterprise linux 5. I created a symbolic link to a shell script but when I try to execute the symbolic link I get the message:
bash: ./ No such file or directory

My working directory is the directory containing the symbolic link and I tried executing it with the command:

Is there some other step I need to perform?
Question by:opike
  • 3
  • 3
  • 2
LVL 48

Expert Comment

ID: 33655651
What does

ls -l


Expert Comment

ID: 33655767
I dont' think your file is executable.  Either use

  chmod +x

or try


Notice the . with a space after.

Author Comment

ID: 33657091
Here is the output from ls -la (links definitely have execute permission set):

[ollie@oracleepm oraclelinks]$ ls -la
total 12
drwxrwxr-x  2 ollie ollie 4096 Sep 11 17:30 .
drwx------ 23 ollie ollie 4096 Sep 12 08:12 ..
lrwxrwxrwx  1 ollie ollie    8 Sep 11 17:25 ->
lrwxrwxrwx  1 ollie ollie   15 Sep 11 17:30 ->
lrwxrwxrwx  1 ollie ollie    7 Sep 11 17:25 ->
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

LVL 48

Accepted Solution

Tintin earned 500 total points
ID: 33658521
There's your problem, you have a symbolic link pointing to a non-existent file.

Where does exist?

You need to do

ln -s  /some/path/to/

Expert Comment

ID: 33668462
That does kind of raise an interesting point.  I see that the file is executable, but it is pointing to something that is in the local directory or available through the path variable.  Does "./" work?  Does "." work?  And, do the others work, and

LVL 48

Expert Comment

ID: 33668803

The symlinks won't work as they point to non-existent files.  Simple as that.

Expert Comment

ID: 33688841
@tintin, just checking all bases.  Seems like an odd question to ask about one particular symlink if none are working.  I just wanted to make sure that none of them are working.  No need to blast me... :-p

Author Closing Comment

ID: 33698545
Mixed up order of arguments...

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access_log 17 147
SonarQube on Linux vs Windows 3 52
AWS Central Authentication 1 86
Apache LDAP Authentication 20 28
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question