Reputation: 7280
I am calling a python script from a rails controller. Say the location of the controller is x
and location of the python script is y
. The python script is such that it create a file to write x=open("file","w")
. The script executes fine. But after the execution, I'm not able to find the write file. Its neither in location x
nor location y
. I also used the command locate file
to find the file, but the command gives no output.
Where should the file ideally go? And why I'm not able to find it
Upvotes: 0
Views: 55
Reputation: 2314
I'd guess that might depend on what your webserver has as a working directory.
locate only finds stuff in it's database, so it won't instantly know of new files. Try
find / -name file
Upvotes: 2