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" <hbaumgartner@diw.de>
To   statalist@hsphsun2.harvard.edu
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" <mdeasnds@fs1.ser.man.ac.uk> 
Gesendet von: owner-statalist@hsphsun2.harvard.edu
03/05/2005 12:31
Bitte antworten an
statalist@hsphsun2.harvard.edu


An
statalist@hsphsun2.harvard.edu
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
neil.shephard@man.ac.uk
nshephard@gmail.com

"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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index