[erlang-questions] clarify: Where does the file go when I do file:write_file("/tmp/zfile", <<"z">>, [raw] ). on a slave?

Bengt Kleberg <>
Wed Jan 13 15:51:36 CET 2016


Sorry for the confusion. I used
to check for the file on the slave. And it gave me the /tmp contents on 
the master, of course.
So the file:write_file/3, with [raw], will create the file on the slave.


On 01/13/2016 03:44 PM, Bengt Kleberg wrote:
> Greetings,
> Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version
> (R16B I think).
> I have started a slave with slave:start/5 (not documented but I need 
> the fifth argument). Since the slave is up and running I suggest that 
> my experience is the same as would happen with slave:start/3.
> I start a shell in the slave and connect to it. There I do:
>  file:write_file( "/tmp/zfile", <<"z">>, [raw] ).
> The file is not present on the slave, nor on the master(*).
> Where is it?
> Bonus points for an explanation of how I can write a file on the 
> slave, from the erlang shell on the same slave.
> bengt
> (*)
> If I do
>  file:write_file( "/tmp/zfile", <<"z">> ).
> the file is on the master, as explained by the slave module 
> documentation.
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list