2

I have just updated to Mojave 10.14.6 and found that the shift-command-5 allows user to set a save file location. I always use Ram Drive to work for temporary file since SSD have a limitation in read/write life. (I have encountered a malfunction SSD before. When that SSD is "broken", it did not allow to write and become read only. So any sensitive data inside it cannot be erased.)

For instance, I set the saving location for the screenshots to Ram Drive. However, the screenshot does not save other than to local drive.(I haven't tried in USB though)

If I set it to a Ram Drive, nothing is saved. If I switch back to a local drive. It works again. Things tried:

  • Add system access rights to the ram drive and the specific folder (not work)
  • Add utilities/screenshot.app to Accessibility in preference (not work)
  • saving location confirmed by defaults read com.apple.screencapture location, it is set in /Volumes/Ram/uploads but just don't work

Does any one have such an experience and successful in doing so? Many thanks.

Edited 1

  1. I am using tmpdisk to create ram drive on startup which formats the ram disk as Mac OS Extended (not in the format list of current MacOS Disk Util)
  2. Tried USB stick (a micro SD card with USB Type-C adapter) running ExFAT, it works. The micro SD come with ExFat because it is sharing with Android phone. I just grab for test and use temporarily.

Edited 2 With the inspiration of @Tetsujin, I have tried the following:

  • I format the Ram drive using Disk Util with ExFat and Mac OS Extended (Journaled). Both work suddenly.

  • Then I reboot to try the startup format. It still works.

  • Then I turn Accessibility off for screenshot.app and then reboot to try, it also works

It seems that only the first time I tried didn't work. I am unsure what make it working or not working. I could only conclude that reformat it and reboot it seems resolving the issue.

Thank for your time.

  • 3
    What format is the RAMDisk? I just tested & it works just the same as any other location [same macOS, no specific changes to permissions]. See - https://i.stack.imgur.com/ymsNp.jpg Mine is formatted HFS+ btw. – Tetsujin Jun 13 '20 at 09:32
  • 2
    Re: SSD read/write limitation. You’ll never be able to write enough data to get close to that limit. See: https://apple.stackexchange.com/a/289040/119271 – Allan Jun 13 '20 at 10:01
  • @Allan - my thought too, but I decided to just go with it, if it turns out to actually be answerable ;) Once bitten, twice shy for the OP. I've had an SSD fail well under expected life [of course it was fully backed up] but it can make you more wary, I guess. – Tetsujin Jun 13 '20 at 10:51
  • 3
    I was posting that more as trivia than a reason not to use a RAM drive. I actually like the thought of using a RAM drive for temp work as there’s no remnants of anything anywhere after a reboot – Allan Jun 13 '20 at 11:29
  • @Tetsujin I use tmpdisk and it is formatted the Ram drive as Mac OS Extended. Not sure what make it not working. Because I try to make it as the daily workflow, so it startup automatically and it does not offer any option for the drive format. – 西門 正 Code Guy Jun 13 '20 at 16:00
  • @Allan It sounds not easy to get close theoretically. Just a share of my usage, last time when it was broken. I used it as a drive for VM to sync. Maybe this usage makes the drive life span shorter. i.e. I connect it to the VM of Windows 10 in Macbook Pro to do data sharing because I was migrating something from Windows back the time. Then it lock suddenly one day with sensitive data inside. It alerted me like what tetsujin mentioned, it make you more wary. – 西門 正 Code Guy Jun 13 '20 at 16:04
  • @Allan Yes, it is undoubtedly good for temp work especially I am doing development. Installing package, download zip files and then extracting them into some folder for test. Nodejs package is also killing because there are far more dependency than one might imagine with deep path. Because I start it up automatically, I set Chrome download to Ram drive by default so that file in and out is always going to Ram. That's my use case for reference. One particularly useful scenario is that I use soft link from development path to ram to install WordPress temporary package for investigation. – 西門 正 Code Guy Jun 13 '20 at 16:10
  • You should have a look at the builtin function mktmp. That combined with a RAM drive makes for some secure temp files – Allan Jun 13 '20 at 17:17
  • I just hacked mine together from bits I found online. In Applescript, do shell script "hdid -nomount ram://" & NumSectors then do shell script "diskutil eraseVolume 'HFS+' '" & VolumeName & "' " & DeviceName I do some other stuff because I actually have this one copy out a directory on launch & sync it back at quit, but those 2 lines are all it needs to set the drive up – Tetsujin Jun 14 '20 at 07:20

0 Answers0