UP | HOME

macOS创建内存盘

使用命令行创建内存盘

$ diskutil erasevolume HFS+ 'RamDisk' `hdiutil attach -nomount ram://XXXXX`

卸载内存盘

$ diskutil eject 'RamDisk'

隐藏内存盘

$ chflags hidden /Volumes/RamDisk

取消隐藏内存盘

$ chflags nohidden /Volumes/RamDisk

保存内存盘数据到磁盘

$ tar --exclude '.Trashes' -czf ~/Downloads/backup.tar.gz .

还原磁盘数据到内存盘

$ tar -zxf ~/Downloads/backup.tar.gz -C /Volumes/RamDisk

Date: 2019-01-07 Mon 11:55

Author: shixiongfei

Created: 2020-09-05 Sat 14:40

Emacs 27.1 (Org mode 9.3)