I need to make a ramfs an mount it to an directory in linux using c++. I want to make it like a user (no sudo
).
I need to call an application on a file that i created and it will be often. Writing it to HDD is very slow.
I found just:
system("mkdir /mnt/ram");
system("mount -t ramfs -o size=20m ramfs /mnt/ram");
but that is not good. I want to be a regular user, and command mount
can be called just as root.
what can i do?
For a userspace ramfs solution, you can use python-fuse-ramfs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With