Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Unix file mode

From   "Neil Shephard" <[email protected]>
To   [email protected]
Subject   Re: st: Unix file mode
Date   Tue, 03 May 2005 11:31:54 +0100

> I am using Stata8 on a Unix machine. 
> I wonder if it is possible, when a do-file saves some data, to set the
> file mode, i.e. the permissions whether the file is for instance read
> only?
> Is there any trick within Stata or do I have to do this manually
> within my Unix. 
> Thanks for all suggestions  in advance. 

You can make a call to the shell from within the do-file to do whatever you want.

Assuming you are saving a file called test.dta, then after its been saved you can change 
permissions to it by....

save test, replace
!chmod 0644 test.dta

* Or change ownership...

!chown users:users

* Or if you wanted to save space...

!bzip2 test.dta



Neil Shephard
Genetics Statistician
ARC Epidemiology Unit, University of Manchester
[email protected]
[email protected]

"If your result needs a statistician then you should design a better experiment" - 
Ernest Rutherford

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index