Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing temporary file location Mac OS X

    I have a large file that I am working with in Stata (about 18GB) and I am running out on space on my hard drive so I want to change the temp file location for Stata to an external hard drive. Something to note though is that I have enough disk space to save it on my hard drive but when I save it Stata comes back with:
    insufficient disk space
    r(699);

    I am hoping that changing the temp file location will fix the problem but I don't know.

    I followed the instructions of a previous question: https://www.statalist.org/forums/for...on-on-mac-os-x

    but this does not work for me..

    I have never used Terminal before so I am not exactly sure what I am doing but when I typed in the first command:
    setenv STATATMP /Volumes/KINGSTON/Data

    it comes back with: -bash: setenv: command not found

    Very grateful for answers..

    Thanks

    Stella

  • #2
    The instructions you followed assumed that the Terminal session would be running the "tcsh" shell; however, on your account on your Mac, Terminal is apparently running the "bash" shell.

    The workaround I have tested is to first type in your terminal window the command
    Code:
    tcsh
    which will invoke the "tcsh" shell (you can tell because the prompt will almost certainly be different). Then you can type the two commands given in the instructions in your terminal window. And once Stata launches, be sure to use the two Stata commands from the instructions to confirm that the new directory is being used.

    Comment


    • #3
      Thanks, so the command now works in Terminal but the directory in Stata has still not changed.

      This is what I get:

      . tempfile x

      . display "`x'"
      /var/folders/lc/gkmhcgmd49xdz1mddkhq9wdc0000gn/T//S_00548.000004

      I don't even know this path.

      I don't really know why I can't save my data set as I have enough space both on my hard drive and on the external hard drive that I am trying to save my file to. Any advice on how I can proceed?


      Comment


      • #4
        Was Stata already running when you ran the commands in Terminal? If so, that was an oversight in the instructions. You must quit Stata before issuing the tcsh, setenv, and open commands in the Terminal window. Stata only checks and changes the location of the temporary directory when Stata is first opened.

        You do not know the path that Stata reported because macOS hides system directories from your casual view.

        Taking a step back, maybe with some further information we can figure out your real problem, which is that you think you have enough room on your hard drive for your dataset, but Stata tells you it doesn't.

        Ignore all that stuff with the terminal and launch Stata as you usually do. Then do whatever you do to get ready to save your dataset. But do the following steps before saving it.
        Code:
        describe, short
        display "`c(pwd)'"
        sh df -H  "`c(pwd)'"
        and then issue your save command. Following that, copy from your Results window everything starting from the describe command and continuing through the error message. Paste it into your Statalist post, preferably using using code delimiters [CODE] and [/CODE] as described in the Statalist FAQ that I recommended you review when I replied to your first Statalist topic.






        Comment


        • #5
          An improved response to this general problem is given in

          https://www.statalist.org/forums/for...nment-variable

          Comment

          Working...
          X