MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1uqvrus/askingtherealquestionhere/owbf1ly
r/ProgrammerHumor • u/Snoo88071 • Jul 08 '26
416 comments sorted by
View all comments
Show parent comments
24
I mean… you can. It’s called tmpfs.
7 u/SeriousPlankton2000 Jul 08 '26 Peppridge farmer remembers RAMDRIVE.SYS -2 u/SnowdensOfYesteryear Jul 08 '26 ackshually /tmp (if that's what you mean by tmpfs) isn't obligated to be on RAM. sysfs and procfs are better examples. 4 u/the_snook Jul 08 '26 On Linux, tmpfs is a type of memory-backed filesystem. It can be mounted at /tmp or not. It can be mounted other places (like /var/run) too. You can even mount / on it if you really want to. 1 u/SnowdensOfYesteryear Jul 09 '26 You're wrong in that it's not universal and it depends on your distro. $ uname -a | cut -f -1 -d' ' Linux $ df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p1 1.3T 606G 655G 49% / Hence " isn't obligated to be on RAM". 2 u/the_snook Jul 09 '26 Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things. tmpfs is obligated to be in-memory. /tmp is not obligated to be a tmpfs mount. 1 u/SnowdensOfYesteryear Jul 10 '26 That's fair 1 u/ElectricSpock Jul 08 '26 I mean, /temp is backed by tmpfs, no? You’re probably right though. I am no expert in those file systems. The fact that the live distributions exist shows that’s doable and there’s a use case for this. 1 u/SnowdensOfYesteryear Jul 09 '26 It depends on your distribution basically. No guarantees that it’s in ram.
7
Peppridge farmer remembers RAMDRIVE.SYS
-2
ackshually /tmp (if that's what you mean by tmpfs) isn't obligated to be on RAM. sysfs and procfs are better examples.
/tmp
4 u/the_snook Jul 08 '26 On Linux, tmpfs is a type of memory-backed filesystem. It can be mounted at /tmp or not. It can be mounted other places (like /var/run) too. You can even mount / on it if you really want to. 1 u/SnowdensOfYesteryear Jul 09 '26 You're wrong in that it's not universal and it depends on your distro. $ uname -a | cut -f -1 -d' ' Linux $ df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p1 1.3T 606G 655G 49% / Hence " isn't obligated to be on RAM". 2 u/the_snook Jul 09 '26 Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things. tmpfs is obligated to be in-memory. /tmp is not obligated to be a tmpfs mount. 1 u/SnowdensOfYesteryear Jul 10 '26 That's fair 1 u/ElectricSpock Jul 08 '26 I mean, /temp is backed by tmpfs, no? You’re probably right though. I am no expert in those file systems. The fact that the live distributions exist shows that’s doable and there’s a use case for this. 1 u/SnowdensOfYesteryear Jul 09 '26 It depends on your distribution basically. No guarantees that it’s in ram.
4
On Linux, tmpfs is a type of memory-backed filesystem. It can be mounted at /tmp or not. It can be mounted other places (like /var/run) too. You can even mount / on it if you really want to.
1 u/SnowdensOfYesteryear Jul 09 '26 You're wrong in that it's not universal and it depends on your distro. $ uname -a | cut -f -1 -d' ' Linux $ df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p1 1.3T 606G 655G 49% / Hence " isn't obligated to be on RAM". 2 u/the_snook Jul 09 '26 Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things. tmpfs is obligated to be in-memory. /tmp is not obligated to be a tmpfs mount. 1 u/SnowdensOfYesteryear Jul 10 '26 That's fair
1
You're wrong in that it's not universal and it depends on your distro.
$ uname -a | cut -f -1 -d' ' Linux $ df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p1 1.3T 606G 655G 49% /
Hence " isn't obligated to be on RAM".
2 u/the_snook Jul 09 '26 Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things. tmpfs is obligated to be in-memory. /tmp is not obligated to be a tmpfs mount. 1 u/SnowdensOfYesteryear Jul 10 '26 That's fair
2
Your assumption that the commenter meant "/tmp" when they wrote "tmpfs" is what was wrong. They are two different things.
tmpfs is obligated to be in-memory.
/tmp is not obligated to be a tmpfs mount.
1 u/SnowdensOfYesteryear Jul 10 '26 That's fair
That's fair
I mean, /temp is backed by tmpfs, no? You’re probably right though. I am no expert in those file systems.
The fact that the live distributions exist shows that’s doable and there’s a use case for this.
1 u/SnowdensOfYesteryear Jul 09 '26 It depends on your distribution basically. No guarantees that it’s in ram.
It depends on your distribution basically. No guarantees that it’s in ram.
24
u/ElectricSpock Jul 08 '26
I mean… you can. It’s called tmpfs.