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

Antwort: Re: st: Unix file mode

From   "Hans J. Baumgartner" <>
Subject   Antwort: Re: st: Unix file mode
Date   Tue, 3 May 2005 17:24:09 +0200

Thanks Neil,

that helped a lot!


Hans J. Baumgartner
Dept. Public Economics
DIW Berlin
German Institut for Economic Research
phone: +49/30/89789-307
fax :      +49/30/89789-114


"Neil Shephard" <> 
Gesendet von:
03/05/2005 12:31
Bitte antworten an


Re: st: Unix file mode

> 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

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

*   For searches and help try:

*   For searches and help try:

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