Shell: No such file or directory, but the file exists

Example File:

# File Name : tools.csh

source $PROJ_DIR/scripts/getOS.csh


Commands run from terminal:

$> echo $SHELL


$> pwd


$> cd work

$> source ../tools.csh

/home/myname/myprojects/project1/scripts/getOS.csh: Command not found

$> ls ../scripts/


$> ls /home/myname/myprojects/project1/scripts/getOS.csh

/home/myname/myprojects/project1/scripts/getOS.csh: No such file or directory

From the above, it seems like, the file exists if accessed using relative path.

Same file is not accessible using absolute path.



Check $PROJ_DIR path carefully starting from ‘/’

There may be typo making it to point to different path, which results in such errors from Shell.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s