Reputation:
I am working on a remote Linux server, connected using SSH. I am new to Unix.
My repo is stored in root/data/anj/myrepo
. Now my home directory root/home/anj/
contains a bash file which executes the code stored in myrepo. But when I run the bash file, it doesn't seem to recognize the root directory and reach the repo. I get the output "file not found" when it tries to execute a file in my repo. How do I get the bash script to recognize the path from the root directory to the repo? It seems that the file is interpreting /data/anj/myrepo
as root/home/anj/data/anj/myrepo
, which shouldn't be happening.
Upvotes: 0
Views: 446
Reputation: 2227
You have to put a / in front of root, because if you don't do that then you are looking for a relative path, but i guess you are looking for the absolute path. so try /root/data/anj/myrepo instead of root/data/anj/myrepo :D
Good luck!
Upvotes: 0