|
From: | Gerald Ebberink |
Subject: | Re: May I want Octave to write files as '-rw-rw-rw-'? |
Date: | Wed, 28 Sep 2005 10:43:07 +0200 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20041207) |
Jun Ohta wrote:
Thank you, John, for your prompt response. My apology for my late response.The -x- bit is used to make an file executable (the fact that there are three -x-'s is for the user/group/all) So unless you are using octave for some extremely exotic work (In which case I would recommend using something else) I cannot see the reason why you would want to execute your data-files from linux directly. If you really want to give all permissions to the file you could do system('chmod 777 <filename>'); where <filename> is the filename you want to change. But please think again for using an other system to create executables.It's because I tested several times. Now I have a question.| On cygwin, when I have Octave write a file using 'fopen', 'fprintf, | and 'fclose', I usually get the written file as '-rw-r--r--'. | Is there any way to setup Octave to write files as '-rw-rw-rw-' or '-| rwxrwxrwx'? Try umask (0) before opening the file.I tried umask (0) before opening the file. when I have Octave write a file using 'fopen', 'fprintf, and 'fclose', I can usually get the written file as '-rw-rw-rw-', not as '-rw-r--r--'. This is different from the behavior I expected. I expected that I would get the written file as '-rwxrwxrwx', not as '-rw-rw-rw-'. I wonder if the behavior I observed is normal on cygwin or linux? I would appreciate any comments.
-- Ing. ing. Gerald Ebberink Research Technician Kernfysisch Versneller Instituut Rijksuniversiteit Groningen Zernikelaan 25 9747 AA Groningen The Netherlands tel: +31 50 363 3518 lab: +31 50 363 3588 mob: +31 61 644 4242 fax: +31 50 363 4003 ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |