Originally Posted by Genocide_Hoax
you can try creating a symbolic link of the reqd file in the current directory. In order to do that just simply do this
# ln -s /data/data.txt data.txt
Then run your code.
I already mentioned that. Also, the paths you used are wrong (especially the "/" in front of the first parameter) and the OP might get confused if he is not familiar with the way ln
One unrelated thing that I want to mention about ln -s
that always confused me until I got it is that the target should be specified relative to the link, NOT
the current directory!
This actually makes sense, since the link itself doesn't know about the current directory you used when making it, the path it stores is treated as relative to the symlink itself.