On 01/07/11 11:42, Royce Williams wrote:
> Christopher Howard said, on 01/02/2011 07:15 PM:
>> Q: Is there a default Linux command (i.e., just a command, not a
>> function in a programming language) to create an empty file with a
>> specified set of permissions? I looked at TOUCH(1), but I didn't see
>> anything about permission bits or a mode string.
>>
>> Please note, it is important that the file is /created/ with the
>> specified permissions, not created with one set of permissions and
>> altered to another.
> Did you ever get an answer to this? I'm not aware of a default Linux command, but you could use a Perl one-liner as a substitute.
>
> sysopen (MYFILE, 'file.txt', O_RDWR|O_EXCL|O_CREAT, 0755); close (MYFILE);
>
> Royce
>
Turn into quite a discussion at the forums:
This actually grew out of some research I was doing on another
complicated subject:
-- frigidcode.com theologia.indicium.us --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.Received on Fri Jan 7 22:53:49 2011
This archive was generated by hypermail 2.1.8 : Fri Jan 07 2011 - 22:53:49 AKST