0

For security reasons I want to setup a temporary directory or partition that will be removed if the system rebooted or in case of power outage.

I tried to create a tmpfs but the files where there after reboot, is there any other option?

womble
  • 96,255
  • 29
  • 175
  • 230
Yossi
  • 103
  • 4

1 Answers1

0

A quick Google search leads to this page: https://www.jamescoyle.net/how-to/943-create-a-ram-disk-in-linux

And this command:

mount -t [TYPE] -o size=[SIZE] [FSTYPE] [MOUNTPOINT]

Example from the link:

mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk

If you did this right, your tmpfs partition should not exist after rebooting.

ender.qa
  • 243
  • 1
  • 7
  • It's weird because I did tried a few guides and the files were still in the tmp directory after reboot, anyway it's working now, thank you ! – Yossi Aug 22 '18 at 23:21
  • That's really weird. Also, in the future please add to your original post any commands you have already tried, e.g. "I tried mount -o foo /dev/bar", which will help others answer your question. – ender.qa Aug 22 '18 at 23:23