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" <[email protected]>
To   [email protected]
Subject   Antwort: Re: st: Unix file mode
Date   Tue, 3 May 2005 17:24:09 +0200

Thanks Neil,

that helped a lot!

Hans




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



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


An
[email protected]
Kopie

Thema
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

HTH's,

Neil

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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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